! function(e, t) {
	"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define &&
		define.amd ? define(t) : (e = e || self).TIM = t()
}(this, (function() {
	var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window :
		"undefined" != typeof global ? global : "undefined" != typeof self ? self : {};

	function t(e, t) {
		return e(t = {
			exports: {}
		}, t.exports), t.exports
	}
	var n = function(e) {
			return e && e.Math == Math && e
		},
		r = n("object" == typeof globalThis && globalThis) || n("object" == typeof window && window) || n(
			"object" == typeof self && self) || n("object" == typeof e && e) || function() {
			return this
		}() || Function("return this")(),
		o = function(e) {
			try {
				return !!e()
			} catch (t) {
				return !0
			}
		},
		i = !o((function() {
			return 7 != Object.defineProperty({}, 1, {
				get: function() {
					return 7
				}
			})[1]
		})),
		a = {}.propertyIsEnumerable,
		s = Object.getOwnPropertyDescriptor,
		u = {
			f: s && !a.call({
				1: 2
			}, 1) ? function(e) {
				var t = s(this, e);
				return !!t && t.enumerable
			} : a
		},
		c = function(e, t) {
			return {
				enumerable: !(1 & e),
				configurable: !(2 & e),
				writable: !(4 & e),
				value: t
			}
		},
		l = {}.toString,
		p = function(e) {
			return l.call(e).slice(8, -1)
		},
		f = "".split,
		h = o((function() {
			return !Object("z").propertyIsEnumerable(0)
		})) ? function(e) {
			return "String" == p(e) ? f.call(e, "") : Object(e)
		} : Object,
		d = function(e) {
			if (null == e) throw TypeError("Can't call method on " + e);
			return e
		},
		g = function(e) {
			return h(d(e))
		},
		m = function(e) {
			return "object" == typeof e ? null !== e : "function" == typeof e
		},
		v = function(e, t) {
			if (!m(e)) return e;
			var n, r;
			if (t && "function" == typeof(n = e.toString) && !m(r = n.call(e))) return r;
			if ("function" == typeof(n = e.valueOf) && !m(r = n.call(e))) return r;
			if (!t && "function" == typeof(n = e.toString) && !m(r = n.call(e))) return r;
			throw TypeError("Can't convert object to primitive value")
		},
		y = {}.hasOwnProperty,
		_ = function(e, t) {
			return y.call(e, t)
		},
		M = r.document,
		I = m(M) && m(M.createElement),
		C = function(e) {
			return I ? M.createElement(e) : {}
		},
		E = !i && !o((function() {
			return 7 != Object.defineProperty(C("div"), "a", {
				get: function() {
					return 7
				}
			}).a
		})),
		S = Object.getOwnPropertyDescriptor,
		T = {
			f: i ? S : function(e, t) {
				if (e = g(e), t = v(t, !0), E) try {
					return S(e, t)
				} catch (n) {}
				if (_(e, t)) return c(!u.f.call(e, t), e[t])
			}
		},
		D = function(e) {
			if (!m(e)) throw TypeError(String(e) + " is not an object");
			return e
		},
		k = Object.defineProperty,
		A = {
			f: i ? k : function(e, t, n) {
				if (D(e), t = v(t, !0), D(n), E) try {
					return k(e, t, n)
				} catch (r) {}
				if ("get" in n || "set" in n) throw TypeError("Accessors not supported");
				return "value" in n && (e[t] = n.value), e
			}
		},
		O = i ? function(e, t, n) {
			return A.f(e, t, c(1, n))
		} : function(e, t, n) {
			return e[t] = n, e
		},
		R = function(e, t) {
			try {
				O(r, e, t)
			} catch (n) {
				r[e] = t
			}
			return t
		},
		N = r["__core-js_shared__"] || R("__core-js_shared__", {}),
		L = Function.toString;
	"function" != typeof N.inspectSource && (N.inspectSource = function(e) {
		return L.call(e)
	});
	var w, b, P, G = N.inspectSource,
		U = r.WeakMap,
		q = "function" == typeof U && /native code/.test(G(U)),
		x = t((function(e) {
			(e.exports = function(e, t) {
				return N[e] || (N[e] = void 0 !== t ? t : {})
			})("versions", []).push({
				version: "3.10.0",
				mode: "global",
				copyright: "© 2021 Denis Pushkarev (zloirock.ru)"
			})
		})),
		F = 0,
		V = Math.random(),
		B = function(e) {
			return "Symbol(" + String(void 0 === e ? "" : e) + ")_" + (++F + V).toString(36)
		},
		j = x("keys"),
		K = function(e) {
			return j[e] || (j[e] = B(e))
		},
		H = {},
		$ = r.WeakMap;
	if (q) {
		var z = N.state || (N.state = new $),
			W = z.get,
			Y = z.has,
			J = z.set;
		w = function(e, t) {
			return t.facade = e, J.call(z, e, t), t
		}, b = function(e) {
			return W.call(z, e) || {}
		}, P = function(e) {
			return Y.call(z, e)
		}
	} else {
		var X = K("state");
		H[X] = !0, w = function(e, t) {
			return t.facade = e, O(e, X, t), t
		}, b = function(e) {
			return _(e, X) ? e[X] : {}
		}, P = function(e) {
			return _(e, X)
		}
	}
	var Q, Z = {
			set: w,
			get: b,
			has: P,
			enforce: function(e) {
				return P(e) ? b(e) : w(e, {})
			},
			getterFor: function(e) {
				return function(t) {
					var n;
					if (!m(t) || (n = b(t)).type !== e) throw TypeError("Incompatible receiver, " + e +
						" required");
					return n
				}
			}
		},
		ee = t((function(e) {
			var t = Z.get,
				n = Z.enforce,
				o = String(String).split("String");
			(e.exports = function(e, t, i, a) {
				var s, u = !!a && !!a.unsafe,
					c = !!a && !!a.enumerable,
					l = !!a && !!a.noTargetGet;
				"function" == typeof i && ("string" != typeof t || _(i, "name") || O(i, "name", t),
						(s = n(i)).source || (s.source = o.join("string" == typeof t ? t : ""))),
					e !== r ? (u ? !l && e[t] && (c = !0) : delete e[t], c ? e[t] = i : O(e, t,
					i)) : c ? e[t] = i : R(t, i)
			})(Function.prototype, "toString", (function() {
				return "function" == typeof this && t(this).source || G(this)
			}))
		})),
		te = r,
		ne = function(e) {
			return "function" == typeof e ? e : void 0
		},
		re = function(e, t) {
			return arguments.length < 2 ? ne(te[e]) || ne(r[e]) : te[e] && te[e][t] || r[e] && r[e][t]
		},
		oe = Math.ceil,
		ie = Math.floor,
		ae = function(e) {
			return isNaN(e = +e) ? 0 : (e > 0 ? ie : oe)(e)
		},
		se = Math.min,
		ue = function(e) {
			return e > 0 ? se(ae(e), 9007199254740991) : 0
		},
		ce = Math.max,
		le = Math.min,
		pe = function(e, t) {
			var n = ae(e);
			return n < 0 ? ce(n + t, 0) : le(n, t)
		},
		fe = function(e) {
			return function(t, n, r) {
				var o, i = g(t),
					a = ue(i.length),
					s = pe(r, a);
				if (e && n != n) {
					for (; a > s;)
						if ((o = i[s++]) != o) return !0
				} else
					for (; a > s; s++)
						if ((e || s in i) && i[s] === n) return e || s || 0;
				return !e && -1
			}
		},
		he = {
			includes: fe(!0),
			indexOf: fe(!1)
		},
		de = he.indexOf,
		ge = function(e, t) {
			var n, r = g(e),
				o = 0,
				i = [];
			for (n in r) !_(H, n) && _(r, n) && i.push(n);
			for (; t.length > o;) _(r, n = t[o++]) && (~de(i, n) || i.push(n));
			return i
		},
		me = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString",
			"toString", "valueOf"
		],
		ve = me.concat("length", "prototype"),
		ye = {
			f: Object.getOwnPropertyNames || function(e) {
				return ge(e, ve)
			}
		},
		_e = {
			f: Object.getOwnPropertySymbols
		},
		Me = re("Reflect", "ownKeys") || function(e) {
			var t = ye.f(D(e)),
				n = _e.f;
			return n ? t.concat(n(e)) : t
		},
		Ie = function(e, t) {
			for (var n = Me(t), r = A.f, o = T.f, i = 0; i < n.length; i++) {
				var a = n[i];
				_(e, a) || r(e, a, o(t, a))
			}
		},
		Ce = /#|\.prototype\./,
		Ee = function(e, t) {
			var n = Te[Se(e)];
			return n == ke || n != De && ("function" == typeof t ? o(t) : !!t)
		},
		Se = Ee.normalize = function(e) {
			return String(e).replace(Ce, ".").toLowerCase()
		},
		Te = Ee.data = {},
		De = Ee.NATIVE = "N",
		ke = Ee.POLYFILL = "P",
		Ae = Ee,
		Oe = T.f,
		Re = function(e, t) {
			var n, o, i, a, s, u = e.target,
				c = e.global,
				l = e.stat;
			if (n = c ? r : l ? r[u] || R(u, {}) : (r[u] || {}).prototype)
				for (o in t) {
					if (a = t[o], i = e.noTargetGet ? (s = Oe(n, o)) && s.value : n[o], !Ae(c ? o : u + (l ?
							"." : "#") + o, e.forced) && void 0 !== i) {
						if (typeof a == typeof i) continue;
						Ie(a, i)
					}(e.sham || i && i.sham) && O(a, "sham", !0), ee(n, o, a, e)
				}
		},
		Ne = Object.keys || function(e) {
			return ge(e, me)
		},
		Le = i ? Object.defineProperties : function(e, t) {
			D(e);
			for (var n, r = Ne(t), o = r.length, i = 0; o > i;) A.f(e, n = r[i++], t[n]);
			return e
		},
		we = re("document", "documentElement"),
		be = K("IE_PROTO"),
		Pe = function() {},
		Ge = function(e) {
			return "<script>" + e + "<\/script>"
		},
		Ue = function() {
			try {
				Q = document.domain && new ActiveXObject("htmlfile")
			} catch (r) {}
			var e, t;
			Ue = Q ? function(e) {
				e.write(Ge("")), e.close();
				var t = e.parentWindow.Object;
				return e = null, t
			}(Q) : ((t = C("iframe")).style.display = "none", we.appendChild(t), t.src = String(
					"javascript:"), (e = t.contentWindow.document).open(), e.write(Ge("document.F=Object")),
				e.close(), e.F);
			for (var n = me.length; n--;) delete Ue.prototype[me[n]];
			return Ue()
		};
	H[be] = !0;
	var qe = Object.create || function(e, t) {
		var n;
		return null !== e ? (Pe.prototype = D(e), n = new Pe, Pe.prototype = null, n[be] = e) : n = Ue(),
			void 0 === t ? n : Le(n, t)
	};
	Re({
		target: "Object",
		stat: !0,
		sham: !i
	}, {
		create: qe
	});
	var xe, Fe, Ve = function(e) {
			if ("function" != typeof e) throw TypeError(String(e) + " is not a function");
			return e
		},
		Be = function(e, t, n) {
			if (Ve(e), void 0 === t) return e;
			switch (n) {
				case 0:
					return function() {
						return e.call(t)
					};
				case 1:
					return function(n) {
						return e.call(t, n)
					};
				case 2:
					return function(n, r) {
						return e.call(t, n, r)
					};
				case 3:
					return function(n, r, o) {
						return e.call(t, n, r, o)
					}
			}
			return function() {
				return e.apply(t, arguments)
			}
		},
		je = function(e) {
			return Object(d(e))
		},
		Ke = Array.isArray || function(e) {
			return "Array" == p(e)
		},
		He = "process" == p(r.process),
		$e = re("navigator", "userAgent") || "",
		ze = r.process,
		We = ze && ze.versions,
		Ye = We && We.v8;
	Ye ? Fe = (xe = Ye.split("."))[0] + xe[1] : $e && (!(xe = $e.match(/Edge\/(\d+)/)) || xe[1] >= 74) && (xe =
		$e.match(/Chrome\/(\d+)/)) && (Fe = xe[1]);
	var Je = Fe && +Fe,
		Xe = !!Object.getOwnPropertySymbols && !o((function() {
			return !Symbol.sham && (He ? 38 === Je : Je > 37 && Je < 41)
		})),
		Qe = Xe && !Symbol.sham && "symbol" == typeof Symbol.iterator,
		Ze = x("wks"),
		et = r.Symbol,
		nt = Qe ? et : et && et.withoutSetter || B,
		rt = function(e) {
			return _(Ze, e) && (Xe || "string" == typeof Ze[e]) || (Xe && _(et, e) ? Ze[e] = et[e] : Ze[e] = nt(
				"Symbol." + e)), Ze[e]
		},
		ot = rt("species"),
		it = function(e, t) {
			var n;
			return Ke(e) && ("function" != typeof(n = e.constructor) || n !== Array && !Ke(n.prototype) ? m(
				n) && null === (n = n[ot]) && (n = void 0) : n = void 0), new(void 0 === n ? Array : n)(
				0 === t ? 0 : t)
		},
		at = [].push,
		st = function(e) {
			var t = 1 == e,
				n = 2 == e,
				r = 3 == e,
				o = 4 == e,
				i = 6 == e,
				a = 7 == e,
				s = 5 == e || i;
			return function(u, c, l, p) {
				for (var f, d, g = je(u), m = h(g), v = Be(c, l, 3), y = ue(m.length), _ = 0, M = p || it,
						I = t ? M(u, y) : n || a ? M(u, 0) : void 0; y > _; _++)
					if ((s || _ in m) && (d = v(f = m[_], _, g), e))
						if (t) I[_] = d;
						else if (d) switch (e) {
					case 3:
						return !0;
					case 5:
						return f;
					case 6:
						return _;
					case 2:
						at.call(I, f)
				} else switch (e) {
					case 4:
						return !1;
					case 7:
						at.call(I, f)
				}
				return i ? -1 : r || o ? o : I
			}
		},
		ut = {
			forEach: st(0),
			map: st(1),
			filter: st(2),
			some: st(3),
			every: st(4),
			find: st(5),
			findIndex: st(6),
			filterOut: st(7)
		},
		ct = function(e, t) {
			var n = [][e];
			return !!n && o((function() {
				n.call(null, t || function() {
					throw 1
				}, 1)
			}))
		},
		lt = ut.forEach,
		pt = ct("forEach") ? [].forEach : function(e) {
			return lt(this, e, arguments.length > 1 ? arguments[1] : void 0)
		};
	Re({
		target: "Array",
		proto: !0,
		forced: [].forEach != pt
	}, {
		forEach: pt
	});
	var ft = {
		CSSRuleList: 0,
		CSSStyleDeclaration: 0,
		CSSValueList: 0,
		ClientRectList: 0,
		DOMRectList: 0,
		DOMStringList: 0,
		DOMTokenList: 1,
		DataTransferItemList: 0,
		FileList: 0,
		HTMLAllCollection: 0,
		HTMLCollection: 0,
		HTMLFormElement: 0,
		HTMLSelectElement: 0,
		MediaList: 0,
		MimeTypeArray: 0,
		NamedNodeMap: 0,
		NodeList: 1,
		PaintRequestList: 0,
		Plugin: 0,
		PluginArray: 0,
		SVGLengthList: 0,
		SVGNumberList: 0,
		SVGPathSegList: 0,
		SVGPointList: 0,
		SVGStringList: 0,
		SVGTransformList: 0,
		SourceBufferList: 0,
		StyleSheetList: 0,
		TextTrackCueList: 0,
		TextTrackList: 0,
		TouchList: 0
	};
	for (var ht in ft) {
		var dt = r[ht],
			gt = dt && dt.prototype;
		if (gt && gt.forEach !== pt) try {
			O(gt, "forEach", pt)
		} catch (v_) {
			gt.forEach = pt
		}
	}
	var mt = o((function() {
		Ne(1)
	}));
	Re({
		target: "Object",
		stat: !0,
		forced: mt
	}, {
		keys: function(e) {
			return Ne(je(e))
		}
	});
	var vt = function(e) {
			var t = e.return;
			if (void 0 !== t) return D(t.call(e)).value
		},
		yt = function(e, t, n, r) {
			try {
				return r ? t(D(n)[0], n[1]) : t(n)
			} catch (v_) {
				throw vt(e), v_
			}
		},
		_t = {},
		Mt = rt("iterator"),
		It = Array.prototype,
		Ct = function(e) {
			return void 0 !== e && (_t.Array === e || It[Mt] === e)
		},
		Et = function(e, t, n) {
			var r = v(t);
			r in e ? A.f(e, r, c(0, n)) : e[r] = n
		},
		St = {};
	St[rt("toStringTag")] = "z";
	var Tt = "[object z]" === String(St),
		Dt = rt("toStringTag"),
		kt = "Arguments" == p(function() {
			return arguments
		}()),
		At = Tt ? p : function(e) {
			var t, n, r;
			return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof(n = function(e, t) {
					try {
						return e[t]
					} catch (v_) {}
				}(t = Object(e), Dt)) ? n : kt ? p(t) : "Object" == (r = p(t)) && "function" == typeof t
				.callee ? "Arguments" : r
		},
		Ot = rt("iterator"),
		Rt = function(e) {
			if (null != e) return e[Ot] || e["@@iterator"] || _t[At(e)]
		},
		Nt = function(e) {
			var t, n, r, o, i, a, s = je(e),
				u = "function" == typeof this ? this : Array,
				c = arguments.length,
				l = c > 1 ? arguments[1] : void 0,
				p = void 0 !== l,
				f = Rt(s),
				h = 0;
			if (p && (l = Be(l, c > 2 ? arguments[2] : void 0, 2)), null == f || u == Array && Ct(f))
				for (n = new u(t = ue(s.length)); t > h; h++) a = p ? l(s[h], h) : s[h], Et(n, h, a);
			else
				for (i = (o = f.call(s)).next, n = new u; !(r = i.call(o)).done; h++) a = p ? yt(o, l, [r.value,
					h
				], !0) : r.value, Et(n, h, a);
			return n.length = h, n
		},
		Lt = rt("iterator"),
		wt = !1;
	try {
		var bt = 0,
			Pt = {
				next: function() {
					return {
						done: !!bt++
					}
				},
				return: function() {
					wt = !0
				}
			};
		Pt[Lt] = function() {
			return this
		}, Array.from(Pt, (function() {
			throw 2
		}))
	} catch (v_) {}
	var Gt = function(e, t) {
			if (!t && !wt) return !1;
			var n = !1;
			try {
				var r = {};
				r[Lt] = function() {
					return {
						next: function() {
							return {
								done: n = !0
							}
						}
					}
				}, e(r)
			} catch (v_) {}
			return n
		},
		Ut = !Gt((function(e) {
			Array.from(e)
		}));
	Re({
		target: "Array",
		stat: !0,
		forced: Ut
	}, {
		from: Nt
	});
	var qt, xt, Ft, Vt = function(e) {
			return function(t, n) {
				var r, o, i = String(d(t)),
					a = ae(n),
					s = i.length;
				return a < 0 || a >= s ? e ? "" : void 0 : (r = i.charCodeAt(a)) < 55296 || r > 56319 || a +
					1 === s || (o = i.charCodeAt(a + 1)) < 56320 || o > 57343 ? e ? i.charAt(a) : r : e ? i
					.slice(a, a + 2) : o - 56320 + (r - 55296 << 10) + 65536
			}
		},
		Bt = {
			codeAt: Vt(!1),
			charAt: Vt(!0)
		},
		jt = !o((function() {
			function e() {}
			return e.prototype.constructor = null, Object.getPrototypeOf(new e) !== e.prototype
		})),
		Kt = K("IE_PROTO"),
		Ht = Object.prototype,
		$t = jt ? Object.getPrototypeOf : function(e) {
			return e = je(e), _(e, Kt) ? e[Kt] : "function" == typeof e.constructor && e instanceof e
				.constructor ? e.constructor.prototype : e instanceof Object ? Ht : null
		},
		zt = rt("iterator"),
		Wt = !1;
	[].keys && ("next" in (Ft = [].keys()) ? (xt = $t($t(Ft))) !== Object.prototype && (qt = xt) : Wt = !0), (
		null == qt || o((function() {
			var e = {};
			return qt[zt].call(e) !== e
		}))) && (qt = {}), _(qt, zt) || O(qt, zt, (function() {
		return this
	}));
	var Yt = {
			IteratorPrototype: qt,
			BUGGY_SAFARI_ITERATORS: Wt
		},
		Jt = A.f,
		Xt = rt("toStringTag"),
		Qt = function(e, t, n) {
			e && !_(e = n ? e : e.prototype, Xt) && Jt(e, Xt, {
				configurable: !0,
				value: t
			})
		},
		Zt = Yt.IteratorPrototype,
		en = function() {
			return this
		},
		tn = function(e, t, n) {
			var r = t + " Iterator";
			return e.prototype = qe(Zt, {
				next: c(1, n)
			}), Qt(e, r, !1), _t[r] = en, e
		},
		nn = Object.setPrototypeOf || ("__proto__" in {} ? function() {
			var e, t = !1,
				n = {};
			try {
				(e = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set).call(n, []), t =
					n instanceof Array
			} catch (v_) {}
			return function(n, r) {
				return D(n),
					function(e) {
						if (!m(e) && null !== e) throw TypeError("Can't set " + String(e) +
							" as a prototype")
					}(r), t ? e.call(n, r) : n.__proto__ = r, n
			}
		}() : void 0),
		rn = Yt.IteratorPrototype,
		on = Yt.BUGGY_SAFARI_ITERATORS,
		an = rt("iterator"),
		sn = function() {
			return this
		},
		un = function(e, t, n, r, o, i, a) {
			tn(n, t, r);
			var s, u, c, l = function(e) {
					if (e === o && g) return g;
					if (!on && e in h) return h[e];
					switch (e) {
						case "keys":
						case "values":
						case "entries":
							return function() {
								return new n(this, e)
							}
					}
					return function() {
						return new n(this)
					}
				},
				p = t + " Iterator",
				f = !1,
				h = e.prototype,
				d = h[an] || h["@@iterator"] || o && h[o],
				g = !on && d || l(o),
				m = "Array" == t && h.entries || d;
			if (m && (s = $t(m.call(new e)), rn !== Object.prototype && s.next && ($t(s) !== rn && (nn ? nn(s,
					rn) : "function" != typeof s[an] && O(s, an, sn)), Qt(s, p, !0))), "values" == o && d &&
				"values" !== d.name && (f = !0, g = function() {
					return d.call(this)
				}), h[an] !== g && O(h, an, g), _t[t] = g, o)
				if (u = {
						values: l("values"),
						keys: i ? g : l("keys"),
						entries: l("entries")
					}, a)
					for (c in u)(on || f || !(c in h)) && ee(h, c, u[c]);
				else Re({
					target: t,
					proto: !0,
					forced: on || f
				}, u);
			return u
		},
		cn = Bt.charAt,
		ln = Z.set,
		pn = Z.getterFor("String Iterator");
	un(String, "String", (function(e) {
		ln(this, {
			type: "String Iterator",
			string: String(e),
			index: 0
		})
	}), (function() {
		var e, t = pn(this),
			n = t.string,
			r = t.index;
		return r >= n.length ? {
			value: void 0,
			done: !0
		} : (e = cn(n, r), t.index += e.length, {
			value: e,
			done: !1
		})
	}));
	var fn = rt("species"),
		hn = function(e) {
			return Je >= 51 || !o((function() {
				var t = [];
				return (t.constructor = {})[fn] = function() {
					return {
						foo: 1
					}
				}, 1 !== t[e](Boolean).foo
			}))
		},
		dn = rt("isConcatSpreadable"),
		gn = Je >= 51 || !o((function() {
			var e = [];
			return e[dn] = !1, e.concat()[0] !== e
		})),
		mn = hn("concat"),
		vn = function(e) {
			if (!m(e)) return !1;
			var t = e[dn];
			return void 0 !== t ? !!t : Ke(e)
		};
	Re({
		target: "Array",
		proto: !0,
		forced: !gn || !mn
	}, {
		concat: function(e) {
			var t, n, r, o, i, a = je(this),
				s = it(a, 0),
				u = 0;
			for (t = -1, r = arguments.length; t < r; t++)
				if (vn(i = -1 === t ? a : arguments[t])) {
					if (u + (o = ue(i.length)) > 9007199254740991) throw TypeError(
						"Maximum allowed index exceeded");
					for (n = 0; n < o; n++, u++) n in i && Et(s, u, i[n])
				} else {
					if (u >= 9007199254740991) throw TypeError("Maximum allowed index exceeded");
					Et(s, u++, i)
				} return s.length = u, s
		}
	});
	var yn = {
			SDK_READY: "sdkStateReady",
			SDK_NOT_READY: "sdkStateNotReady",
			SDK_DESTROY: "sdkDestroy",
			MESSAGE_RECEIVED: "onMessageReceived",
			MESSAGE_REVOKED: "onMessageRevoked",
			MESSAGE_READ_BY_PEER: "onMessageReadByPeer",
			CONVERSATION_LIST_UPDATED: "onConversationListUpdated",
			GROUP_LIST_UPDATED: "onGroupListUpdated",
			GROUP_SYSTEM_NOTICE_RECEIVED: "receiveGroupSystemNotice",
			PROFILE_UPDATED: "onProfileUpdated",
			BLACKLIST_UPDATED: "blacklistUpdated",
			KICKED_OUT: "kickedOut",
			ERROR: "error",
			NET_STATE_CHANGE: "netStateChange",
			SDK_RELOAD: "sdkReload"
		},
		_n = {
			MSG_TEXT: "TIMTextElem",
			MSG_IMAGE: "TIMImageElem",
			MSG_SOUND: "TIMSoundElem",
			MSG_AUDIO: "TIMSoundElem",
			MSG_FILE: "TIMFileElem",
			MSG_FACE: "TIMFaceElem",
			MSG_VIDEO: "TIMVideoFileElem",
			MSG_GEO: "TIMLocationElem",
			MSG_GRP_TIP: "TIMGroupTipElem",
			MSG_GRP_SYS_NOTICE: "TIMGroupSystemNoticeElem",
			MSG_CUSTOM: "TIMCustomElem",
			MSG_MERGER: "TIMRelayElem",
			MSG_PRIORITY_HIGH: "High",
			MSG_PRIORITY_NORMAL: "Normal",
			MSG_PRIORITY_LOW: "Low",
			MSG_PRIORITY_LOWEST: "Lowest",
			CONV_C2C: "C2C",
			CONV_GROUP: "GROUP",
			CONV_SYSTEM: "@TIM#SYSTEM",
			CONV_AT_ME: 1,
			CONV_AT_ALL: 2,
			CONV_AT_ALL_AT_ME: 3,
			GRP_PRIVATE: "Private",
			GRP_WORK: "Private",
			GRP_PUBLIC: "Public",
			GRP_CHATROOM: "ChatRoom",
			GRP_MEETING: "ChatRoom",
			GRP_AVCHATROOM: "AVChatRoom",
			GRP_MBR_ROLE_OWNER: "Owner",
			GRP_MBR_ROLE_ADMIN: "Admin",
			GRP_MBR_ROLE_MEMBER: "Member",
			GRP_TIP_MBR_JOIN: 1,
			GRP_TIP_MBR_QUIT: 2,
			GRP_TIP_MBR_KICKED_OUT: 3,
			GRP_TIP_MBR_SET_ADMIN: 4,
			GRP_TIP_MBR_CANCELED_ADMIN: 5,
			GRP_TIP_GRP_PROFILE_UPDATED: 6,
			GRP_TIP_MBR_PROFILE_UPDATED: 7,
			MSG_REMIND_ACPT_AND_NOTE: "AcceptAndNotify",
			MSG_REMIND_ACPT_NOT_NOTE: "AcceptNotNotify",
			MSG_REMIND_DISCARD: "Discard",
			GENDER_UNKNOWN: "Gender_Type_Unknown",
			GENDER_FEMALE: "Gender_Type_Female",
			GENDER_MALE: "Gender_Type_Male",
			KICKED_OUT_MULT_ACCOUNT: "multipleAccount",
			KICKED_OUT_MULT_DEVICE: "multipleDevice",
			KICKED_OUT_USERSIG_EXPIRED: "userSigExpired",
			ALLOW_TYPE_ALLOW_ANY: "AllowType_Type_AllowAny",
			ALLOW_TYPE_NEED_CONFIRM: "AllowType_Type_NeedConfirm",
			ALLOW_TYPE_DENY_ANY: "AllowType_Type_DenyAny",
			FORBID_TYPE_NONE: "AdminForbid_Type_None",
			FORBID_TYPE_SEND_OUT: "AdminForbid_Type_SendOut",
			JOIN_OPTIONS_FREE_ACCESS: "FreeAccess",
			JOIN_OPTIONS_NEED_PERMISSION: "NeedPermission",
			JOIN_OPTIONS_DISABLE_APPLY: "DisableApply",
			JOIN_STATUS_SUCCESS: "JoinedSuccess",
			JOIN_STATUS_ALREADY_IN_GROUP: "AlreadyInGroup",
			JOIN_STATUS_WAIT_APPROVAL: "WaitAdminApproval",
			GRP_PROFILE_OWNER_ID: "ownerID",
			GRP_PROFILE_CREATE_TIME: "createTime",
			GRP_PROFILE_LAST_INFO_TIME: "lastInfoTime",
			GRP_PROFILE_MEMBER_NUM: "memberNum",
			GRP_PROFILE_MAX_MEMBER_NUM: "maxMemberNum",
			GRP_PROFILE_JOIN_OPTION: "joinOption",
			GRP_PROFILE_INTRODUCTION: "introduction",
			GRP_PROFILE_NOTIFICATION: "notification",
			GRP_PROFILE_MUTE_ALL_MBRS: "muteAllMembers",
			NET_STATE_CONNECTED: "connected",
			NET_STATE_CONNECTING: "connecting",
			NET_STATE_DISCONNECTED: "disconnected",
			MSG_AT_ALL: "__kImSDK_MesssageAtALL__"
		};

	function Mn(e) {
		return (Mn = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
			return typeof e
		} : function(e) {
			return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol
				.prototype ? "symbol" : typeof e
		})(e)
	}

	function In(e, t) {
		if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
	}

	function Cn(e, t) {
		for (var n = 0; n < t.length; n++) {
			var r = t[n];
			r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object
				.defineProperty(e, r.key, r)
		}
	}

	function En(e, t, n) {
		return t && Cn(e.prototype, t), n && Cn(e, n), e
	}

	function Sn(e, t, n) {
		return t in e ? Object.defineProperty(e, t, {
			value: n,
			enumerable: !0,
			configurable: !0,
			writable: !0
		}) : e[t] = n, e
	}

	function Tn(e, t) {
		var n = Object.keys(e);
		if (Object.getOwnPropertySymbols) {
			var r = Object.getOwnPropertySymbols(e);
			t && (r = r.filter((function(t) {
				return Object.getOwnPropertyDescriptor(e, t).enumerable
			}))), n.push.apply(n, r)
		}
		return n
	}

	function Dn(e) {
		for (var t = 1; t < arguments.length; t++) {
			var n = null != arguments[t] ? arguments[t] : {};
			t % 2 ? Tn(Object(n), !0).forEach((function(t) {
				Sn(e, t, n[t])
			})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object
				.getOwnPropertyDescriptors(n)) : Tn(Object(n)).forEach((function(t) {
				Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
			}))
		}
		return e
	}

	function kn(e, t) {
		if ("function" != typeof t && null !== t) throw new TypeError(
			"Super expression must either be null or a function");
		e.prototype = Object.create(t && t.prototype, {
			constructor: {
				value: e,
				writable: !0,
				configurable: !0
			}
		}), t && On(e, t)
	}

	function An(e) {
		return (An = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
			return e.__proto__ || Object.getPrototypeOf(e)
		})(e)
	}

	function On(e, t) {
		return (On = Object.setPrototypeOf || function(e, t) {
			return e.__proto__ = t, e
		})(e, t)
	}

	function Rn() {
		if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
		if (Reflect.construct.sham) return !1;
		if ("function" == typeof Proxy) return !0;
		try {
			return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
		} catch (e) {
			return !1
		}
	}

	function Nn(e, t, n) {
		return (Nn = Rn() ? Reflect.construct : function(e, t, n) {
			var r = [null];
			r.push.apply(r, t);
			var o = new(Function.bind.apply(e, r));
			return n && On(o, n.prototype), o
		}).apply(null, arguments)
	}

	function Ln(e) {
		var t = "function" == typeof Map ? new Map : void 0;
		return (Ln = function(e) {
			if (null === e || (n = e, -1 === Function.toString.call(n).indexOf("[native code]")))
			return e;
			var n;
			if ("function" != typeof e) throw new TypeError(
				"Super expression must either be null or a function");
			if (void 0 !== t) {
				if (t.has(e)) return t.get(e);
				t.set(e, r)
			}

			function r() {
				return Nn(e, arguments, An(this).constructor)
			}
			return r.prototype = Object.create(e.prototype, {
				constructor: {
					value: r,
					enumerable: !1,
					writable: !0,
					configurable: !0
				}
			}), On(r, e)
		})(e)
	}

	function wn(e, t) {
		if (null == e) return {};
		var n, r, o = function(e, t) {
			if (null == e) return {};
			var n, r, o = {},
				i = Object.keys(e);
			for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
			return o
		}(e, t);
		if (Object.getOwnPropertySymbols) {
			var i = Object.getOwnPropertySymbols(e);
			for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable
				.call(e, n) && (o[n] = e[n])
		}
		return o
	}

	function bn(e) {
		if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
		return e
	}

	function Pn(e, t) {
		return !t || "object" != typeof t && "function" != typeof t ? bn(e) : t
	}

	function Gn(e) {
		var t = Rn();
		return function() {
			var n, r = An(e);
			if (t) {
				var o = An(this).constructor;
				n = Reflect.construct(r, arguments, o)
			} else n = r.apply(this, arguments);
			return Pn(this, n)
		}
	}

	function Un(e, t) {
		return xn(e) || function(e, t) {
			if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return;
			var n = [],
				r = !0,
				o = !1,
				i = void 0;
			try {
				for (var a, s = e[Symbol.iterator](); !(r = (a = s.next()).done) && (n.push(a.value), !t ||
						n.length !== t); r = !0);
			} catch (u) {
				o = !0, i = u
			} finally {
				try {
					r || null == s.return || s.return()
				} finally {
					if (o) throw i
				}
			}
			return n
		}(e, t) || Vn(e, t) || jn()
	}

	function qn(e) {
		return function(e) {
			if (Array.isArray(e)) return Bn(e)
		}(e) || Fn(e) || Vn(e) || function() {
			throw new TypeError(
				"Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
				)
		}()
	}

	function xn(e) {
		if (Array.isArray(e)) return e
	}

	function Fn(e) {
		if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e)
	}

	function Vn(e, t) {
		if (e) {
			if ("string" == typeof e) return Bn(e, t);
			var n = Object.prototype.toString.call(e).slice(8, -1);
			return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ?
				Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Bn(e,
					t) : void 0
		}
	}

	function Bn(e, t) {
		(null == t || t > e.length) && (t = e.length);
		for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
		return r
	}

	function jn() {
		throw new TypeError(
			"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
			)
	}

	function Kn(e, t) {
		var n;
		if ("undefined" == typeof Symbol || null == e[Symbol.iterator]) {
			if (Array.isArray(e) || (n = Vn(e)) || t && e && "number" == typeof e.length) {
				n && (e = n);
				var r = 0,
					o = function() {};
				return {
					s: o,
					n: function() {
						return r >= e.length ? {
							done: !0
						} : {
							done: !1,
							value: e[r++]
						}
					},
					e: function(e) {
						throw e
					},
					f: o
				}
			}
			throw new TypeError(
				"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
				)
		}
		var i, a = !0,
			s = !1;
		return {
			s: function() {
				n = e[Symbol.iterator]()
			},
			n: function() {
				var e = n.next();
				return a = e.done, e
			},
			e: function(e) {
				s = !0, i = e
			},
			f: function() {
				try {
					a || null == n.return || n.return()
				} finally {
					if (s) throw i
				}
			}
		}
	}
	var Hn = [].slice,
		$n = {},
		zn = function(e, t, n) {
			if (!(t in $n)) {
				for (var r = [], o = 0; o < t; o++) r[o] = "a[" + o + "]";
				$n[t] = Function("C,a", "return new C(" + r.join(",") + ")")
			}
			return $n[t](e, n)
		},
		Wn = Function.bind || function(e) {
			var t = Ve(this),
				n = Hn.call(arguments, 1),
				r = function() {
					var o = n.concat(Hn.call(arguments));
					return this instanceof r ? zn(t, o.length, o) : t.apply(e, o)
				};
			return m(t.prototype) && (r.prototype = t.prototype), r
		};
	Re({
		target: "Function",
		proto: !0
	}, {
		bind: Wn
	});
	var Yn = ut.map,
		Jn = hn("map");
	Re({
		target: "Array",
		proto: !0,
		forced: !Jn
	}, {
		map: function(e) {
			return Yn(this, e, arguments.length > 1 ? arguments[1] : void 0)
		}
	});
	var Xn = function() {
			function e() {
				In(this, e), this.cache = [], this.options = null
			}
			return En(e, [{
				key: "use",
				value: function(e) {
					if ("function" != typeof e) throw "middleware must be a function";
					return this.cache.push(e), this
				}
			}, {
				key: "next",
				value: function(e) {
					if (this.middlewares && this.middlewares.length > 0) return this.middlewares
						.shift().call(this, this.options, this.next.bind(this))
				}
			}, {
				key: "run",
				value: function(e) {
					return this.middlewares = this.cache.map((function(e) {
						return e
					})), this.options = e, this.next()
				}
			}]), e
		}(),
		Qn = A.f,
		Zn = Function.prototype,
		er = Zn.toString,
		tr = /^\s*function ([^ (]*)/;
	i && !("name" in Zn) && Qn(Zn, "name", {
		configurable: !0,
		get: function() {
			try {
				return er.call(this).match(tr)[1]
			} catch (v_) {
				return ""
			}
		}
	});
	var nr = t((function(t, n) {
		var r, o, i, a, s, u, c, l, p, f, h, d, g, m, v, y, _, M;
		t.exports = (r = "function" == typeof Promise, o = "object" == typeof self ? self : e, i =
			"undefined" != typeof Symbol, a = "undefined" != typeof Map, s = "undefined" !=
			typeof Set, u = "undefined" != typeof WeakMap, c = "undefined" != typeof WeakSet,
			l = "undefined" != typeof DataView, p = i && void 0 !== Symbol.iterator, f = i &&
			void 0 !== Symbol.toStringTag, h = s && "function" == typeof Set.prototype.entries,
			d = a && "function" == typeof Map.prototype.entries, g = h && Object.getPrototypeOf(
				(new Set).entries()), m = d && Object.getPrototypeOf((new Map).entries()), v =
			p && "function" == typeof Array.prototype[Symbol.iterator], y = v && Object
			.getPrototypeOf([][Symbol.iterator]()), _ = p && "function" == typeof String
			.prototype[Symbol.iterator], M = _ && Object.getPrototypeOf("" [Symbol.iterator]()),
			function(e) {
				var t = typeof e;
				if ("object" !== t) return t;
				if (null === e) return "null";
				if (e === o) return "global";
				if (Array.isArray(e) && (!1 === f || !(Symbol.toStringTag in e)))
			return "Array";
				if ("object" == typeof window && null !== window) {
					if ("object" == typeof window.location && e === window.location)
					return "Location";
					if ("object" == typeof window.document && e === window.document)
					return "Document";
					if ("object" == typeof window.navigator) {
						if ("object" == typeof window.navigator.mimeTypes && e === window
							.navigator.mimeTypes) return "MimeTypeArray";
						if ("object" == typeof window.navigator.plugins && e === window
							.navigator.plugins) return "PluginArray"
					}
					if (("function" == typeof window.HTMLElement || "object" == typeof window
							.HTMLElement) && e instanceof window.HTMLElement) {
						if ("BLOCKQUOTE" === e.tagName) return "HTMLQuoteElement";
						if ("TD" === e.tagName) return "HTMLTableDataCellElement";
						if ("TH" === e.tagName) return "HTMLTableHeaderCellElement"
					}
				}
				var n = f && e[Symbol.toStringTag];
				if ("string" == typeof n) return n;
				var i = Object.getPrototypeOf(e);
				return i === RegExp.prototype ? "RegExp" : i === Date.prototype ? "Date" : r &&
					i === Promise.prototype ? "Promise" : s && i === Set.prototype ? "Set" :
					a && i === Map.prototype ? "Map" : c && i === WeakSet.prototype ?
					"WeakSet" : u && i === WeakMap.prototype ? "WeakMap" : l && i === DataView
					.prototype ? "DataView" : a && i === m ? "Map Iterator" : s && i === g ?
					"Set Iterator" : v && i === y ? "Array Iterator" : _ && i === M ?
					"String Iterator" : null === i ? "Object" : Object.prototype.toString.call(
						e).slice(8, -1)
			})
	}));
	Re({
		target: "Array",
		stat: !0
	}, {
		isArray: Ke
	});
	var rr = function(e, t, n) {
			var r, o;
			return nn && "function" == typeof(r = t.constructor) && r !== n && m(o = r.prototype) && o !== n
				.prototype && nn(e, o), e
		},
		or = "\t\n\v\f\r                　\u2028\u2029\ufeff",
		ir = "[" + or + "]",
		ar = RegExp("^" + ir + ir + "*"),
		sr = RegExp(ir + ir + "*$"),
		ur = function(e) {
			return function(t) {
				var n = String(d(t));
				return 1 & e && (n = n.replace(ar, "")), 2 & e && (n = n.replace(sr, "")), n
			}
		},
		cr = {
			start: ur(1),
			end: ur(2),
			trim: ur(3)
		},
		lr = ye.f,
		pr = T.f,
		fr = A.f,
		hr = cr.trim,
		dr = r.Number,
		gr = dr.prototype,
		mr = "Number" == p(qe(gr)),
		vr = function(e) {
			var t, n, r, o, i, a, s, u, c = v(e, !1);
			if ("string" == typeof c && c.length > 2)
				if (43 === (t = (c = hr(c)).charCodeAt(0)) || 45 === t) {
					if (88 === (n = c.charCodeAt(2)) || 120 === n) return NaN
				} else if (48 === t) {
				switch (c.charCodeAt(1)) {
					case 66:
					case 98:
						r = 2, o = 49;
						break;
					case 79:
					case 111:
						r = 8, o = 55;
						break;
					default:
						return +c
				}
				for (a = (i = c.slice(2)).length, s = 0; s < a; s++)
					if ((u = i.charCodeAt(s)) < 48 || u > o) return NaN;
				return parseInt(i, r)
			}
			return +c
		};
	if (Ae("Number", !dr(" 0o1") || !dr("0b1") || dr("+0x1"))) {
		for (var yr, _r = function(e) {
					var t = arguments.length < 1 ? 0 : e,
						n = this;
					return n instanceof _r && (mr ? o((function() {
						gr.valueOf.call(n)
					})) : "Number" != p(n)) ? rr(new dr(vr(t)), n, _r) : vr(t)
				}, Mr = i ? lr(dr) :
				"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range"
				.split(","), Ir = 0; Mr.length > Ir; Ir++) _(dr, yr = Mr[Ir]) && !_(_r, yr) && fr(_r, yr, pr(dr,
			yr));
		_r.prototype = gr, gr.constructor = _r, ee(r, "Number", _r)
	}
	var Cr = o((function() {
		$t(1)
	}));
	Re({
		target: "Object",
		stat: !0,
		forced: Cr,
		sham: !jt
	}, {
		getPrototypeOf: function(e) {
			return $t(je(e))
		}
	});
	var Er = Tt ? {}.toString : function() {
		return "[object " + At(this) + "]"
	};
	Tt || ee(Object.prototype, "toString", Er, {
		unsafe: !0
	});
	var Sr = function() {
			var e = D(this),
				t = "";
			return e.global && (t += "g"), e.ignoreCase && (t += "i"), e.multiline && (t += "m"), e.dotAll && (
				t += "s"), e.unicode && (t += "u"), e.sticky && (t += "y"), t
		},
		Tr = RegExp.prototype,
		Dr = Tr.toString,
		kr = o((function() {
			return "/a/b" != Dr.call({
				source: "a",
				flags: "b"
			})
		})),
		Ar = "toString" != Dr.name;
	(kr || Ar) && ee(RegExp.prototype, "toString", (function() {
		var e = D(this),
			t = String(e.source),
			n = e.flags;
		return "/" + t + "/" + String(void 0 === n && e instanceof RegExp && !("flags" in Tr) ? Sr
			.call(e) : n)
	}), {
		unsafe: !0
	});
	var Or = Date.prototype,
		Rr = Or.toString,
		Nr = Or.getTime;

	function Lr(e, t) {
		return RegExp(e, t)
	}
	new Date(NaN) + "" != "Invalid Date" && ee(Or, "toString", (function() {
		var e = Nr.call(this);
		return e == e ? Rr.call(this) : "Invalid Date"
	}));
	var wr, br, Pr = {
			UNSUPPORTED_Y: o((function() {
				var e = Lr("a", "y");
				return e.lastIndex = 2, null != e.exec("abcd")
			})),
			BROKEN_CARET: o((function() {
				var e = Lr("^r", "gy");
				return e.lastIndex = 2, null != e.exec("str")
			}))
		},
		Gr = RegExp.prototype.exec,
		Ur = x("native-string-replace", String.prototype.replace),
		qr = Gr,
		xr = (wr = /a/, br = /b*/g, Gr.call(wr, "a"), Gr.call(br, "a"), 0 !== wr.lastIndex || 0 !== br
			.lastIndex),
		Fr = Pr.UNSUPPORTED_Y || Pr.BROKEN_CARET,
		Vr = void 0 !== /()??/.exec("")[1];
	(xr || Vr || Fr) && (qr = function(e) {
		var t, n, r, o, i = this,
			a = Fr && i.sticky,
			s = Sr.call(i),
			u = i.source,
			c = 0,
			l = e;
		return a && (-1 === (s = s.replace("y", "")).indexOf("g") && (s += "g"), l = String(e).slice(i
				.lastIndex), i.lastIndex > 0 && (!i.multiline || i.multiline && "\n" !== e[i.lastIndex -
				1]) && (u = "(?: " + u + ")", l = " " + l, c++), n = new RegExp("^(?:" + u + ")", s)), Vr &&
			(n = new RegExp("^" + u + "$(?!\\s)", s)), xr && (t = i.lastIndex), r = Gr.call(a ? n : i, l),
			a ? r ? (r.input = r.input.slice(c), r[0] = r[0].slice(c), r.index = i.lastIndex, i.lastIndex +=
				r[0].length) : i.lastIndex = 0 : xr && r && (i.lastIndex = i.global ? r.index + r[0]
				.length : t), Vr && r && r.length > 1 && Ur.call(r[0], n, (function() {
				for (o = 1; o < arguments.length - 2; o++) void 0 === arguments[o] && (r[o] =
					void 0)
			})), r
	});
	var Br = qr;
	Re({
		target: "RegExp",
		proto: !0,
		forced: /./.exec !== Br
	}, {
		exec: Br
	});
	var jr = rt("species"),
		Kr = !o((function() {
			var e = /./;
			return e.exec = function() {
				var e = [];
				return e.groups = {
					a: "7"
				}, e
			}, "7" !== "".replace(e, "$<a>")
		})),
		Hr = "$0" === "a".replace(/./, "$0"),
		$r = rt("replace"),
		zr = !!/./ [$r] && "" === /./ [$r]("a", "$0"),
		Wr = !o((function() {
			var e = /(?:)/,
				t = e.exec;
			e.exec = function() {
				return t.apply(this, arguments)
			};
			var n = "ab".split(e);
			return 2 !== n.length || "a" !== n[0] || "b" !== n[1]
		})),
		Yr = function(e, t, n, r) {
			var i = rt(e),
				a = !o((function() {
					var t = {};
					return t[i] = function() {
						return 7
					}, 7 != "" [e](t)
				})),
				s = a && !o((function() {
					var t = !1,
						n = /a/;
					return "split" === e && ((n = {}).constructor = {}, n.constructor[jr] = function() {
						return n
					}, n.flags = "", n[i] = /./ [i]), n.exec = function() {
						return t = !0, null
					}, n[i](""), !t
				}));
			if (!a || !s || "replace" === e && (!Kr || !Hr || zr) || "split" === e && !Wr) {
				var u = /./ [i],
					c = n(i, "" [e], (function(e, t, n, r, o) {
						return t.exec === Br ? a && !o ? {
							done: !0,
							value: u.call(t, n, r)
						} : {
							done: !0,
							value: e.call(n, t, r)
						} : {
							done: !1
						}
					}), {
						REPLACE_KEEPS_$0: Hr,
						REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: zr
					}),
					l = c[0],
					p = c[1];
				ee(String.prototype, e, l), ee(RegExp.prototype, i, 2 == t ? function(e, t) {
					return p.call(e, this, t)
				} : function(e) {
					return p.call(e, this)
				})
			}
			r && O(RegExp.prototype[i], "sham", !0)
		},
		Jr = Bt.charAt,
		Xr = function(e, t, n) {
			return t + (n ? Jr(e, t).length : 1)
		},
		Qr = function(e, t) {
			var n = e.exec;
			if ("function" == typeof n) {
				var r = n.call(e, t);
				if ("object" != typeof r) throw TypeError(
					"RegExp exec method returned something other than an Object or null");
				return r
			}
			if ("RegExp" !== p(e)) throw TypeError("RegExp#exec called on incompatible receiver");
			return Br.call(e, t)
		};
	Yr("match", 1, (function(e, t, n) {
		return [function(t) {
			var n = d(this),
				r = null == t ? void 0 : t[e];
			return void 0 !== r ? r.call(t, n) : new RegExp(t)[e](String(n))
		}, function(e) {
			var r = n(t, e, this);
			if (r.done) return r.value;
			var o = D(e),
				i = String(this);
			if (!o.global) return Qr(o, i);
			var a = o.unicode;
			o.lastIndex = 0;
			for (var s, u = [], c = 0; null !== (s = Qr(o, i));) {
				var l = String(s[0]);
				u[c] = l, "" === l && (o.lastIndex = Xr(i, ue(o.lastIndex), a)), c++
			}
			return 0 === c ? null : u
		}]
	})), Re({
		target: "Date",
		stat: !0
	}, {
		now: function() {
			return (new Date).getTime()
		}
	});
	var Zr = rt("unscopables"),
		eo = Array.prototype;
	null == eo[Zr] && A.f(eo, Zr, {
		configurable: !0,
		value: qe(null)
	});
	var to = function(e) {
			eo[Zr][e] = !0
		},
		no = he.includes;
	Re({
		target: "Array",
		proto: !0
	}, {
		includes: function(e) {
			return no(this, e, arguments.length > 1 ? arguments[1] : void 0)
		}
	}), to("includes");
	var ro = rt("match"),
		oo = function(e) {
			var t;
			return m(e) && (void 0 !== (t = e[ro]) ? !!t : "RegExp" == p(e))
		},
		io = function(e) {
			if (oo(e)) throw TypeError("The method doesn't accept regular expressions");
			return e
		},
		ao = rt("match"),
		so = function(e) {
			var t = /./;
			try {
				"/./" [e](t)
			} catch (n) {
				try {
					return t[ao] = !1, "/./" [e](t)
				} catch (r) {}
			}
			return !1
		};
	Re({
		target: "String",
		proto: !0,
		forced: !so("includes")
	}, {
		includes: function(e) {
			return !!~String(d(this)).indexOf(io(e), arguments.length > 1 ? arguments[1] : void 0)
		}
	});
	var uo = function(e) {
			var t = String(d(this)),
				n = "",
				r = ae(e);
			if (r < 0 || Infinity == r) throw RangeError("Wrong number of repetitions");
			for (; r > 0;
				(r >>>= 1) && (t += t)) 1 & r && (n += t);
			return n
		},
		co = Math.ceil,
		lo = function(e) {
			return function(t, n, r) {
				var o, i, a = String(d(t)),
					s = a.length,
					u = void 0 === r ? " " : String(r),
					c = ue(n);
				return c <= s || "" == u ? a : ((i = uo.call(u, co((o = c - s) / u.length))).length > o && (
					i = i.slice(0, o)), e ? a + i : i + a)
			}
		},
		po = {
			start: lo(!1),
			end: lo(!0)
		}.start,
		fo = Math.abs,
		ho = Date.prototype,
		go = ho.getTime,
		mo = ho.toISOString,
		vo = o((function() {
			return "0385-07-25T07:06:39.999Z" != mo.call(new Date(-50000000000001))
		})) || !o((function() {
			mo.call(new Date(NaN))
		})) ? function() {
			if (!isFinite(go.call(this))) throw RangeError("Invalid time value");
			var e = this.getUTCFullYear(),
				t = this.getUTCMilliseconds(),
				n = e < 0 ? "-" : e > 9999 ? "+" : "";
			return n + po(fo(e), n ? 6 : 4, 0) + "-" + po(this.getUTCMonth() + 1, 2, 0) + "-" + po(this
				.getUTCDate(), 2, 0) + "T" + po(this.getUTCHours(), 2, 0) + ":" + po(this.getUTCMinutes(),
				2, 0) + ":" + po(this.getUTCSeconds(), 2, 0) + "." + po(t, 3, 0) + "Z"
		} : mo;
	Re({
		target: "Date",
		proto: !0,
		forced: Date.prototype.toISOString !== vo
	}, {
		toISOString: vo
	});
	var yo = Math.floor,
		_o = "".replace,
		Mo = /\$([$&'`]|\d{1,2}|<[^>]*>)/g,
		Io = /\$([$&'`]|\d{1,2})/g,
		Co = function(e, t, n, r, o, i) {
			var a = n + e.length,
				s = r.length,
				u = Io;
			return void 0 !== o && (o = je(o), u = Mo), _o.call(i, u, (function(i, u) {
				var c;
				switch (u.charAt(0)) {
					case "$":
						return "$";
					case "&":
						return e;
					case "`":
						return t.slice(0, n);
					case "'":
						return t.slice(a);
					case "<":
						c = o[u.slice(1, -1)];
						break;
					default:
						var l = +u;
						if (0 === l) return i;
						if (l > s) {
							var p = yo(l / 10);
							return 0 === p ? i : p <= s ? void 0 === r[p - 1] ? u.charAt(1) : r[p -
								1] + u.charAt(1) : i
						}
						c = r[l - 1]
				}
				return void 0 === c ? "" : c
			}))
		},
		Eo = Math.max,
		So = Math.min;
	Yr("replace", 2, (function(e, t, n, r) {
		var o = r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,
			i = r.REPLACE_KEEPS_$0,
			a = o ? "$" : "$0";
		return [function(n, r) {
			var o = d(this),
				i = null == n ? void 0 : n[e];
			return void 0 !== i ? i.call(n, o, r) : t.call(String(o), n, r)
		}, function(e, r) {
			if (!o && i || "string" == typeof r && -1 === r.indexOf(a)) {
				var s = n(t, e, this, r);
				if (s.done) return s.value
			}
			var u = D(e),
				c = String(this),
				l = "function" == typeof r;
			l || (r = String(r));
			var p = u.global;
			if (p) {
				var f = u.unicode;
				u.lastIndex = 0
			}
			for (var h = [];;) {
				var d = Qr(u, c);
				if (null === d) break;
				if (h.push(d), !p) break;
				"" === String(d[0]) && (u.lastIndex = Xr(c, ue(u.lastIndex), f))
			}
			for (var g, m = "", v = 0, y = 0; y < h.length; y++) {
				d = h[y];
				for (var _ = String(d[0]), M = Eo(So(ae(d.index), c.length), 0), I = [], C =
						1; C < d.length; C++) I.push(void 0 === (g = d[C]) ? g : String(g));
				var E = d.groups;
				if (l) {
					var S = [_].concat(I, M, c);
					void 0 !== E && S.push(E);
					var T = String(r.apply(void 0, S))
				} else T = Co(_, c, M, I, E, r);
				M >= v && (m += c.slice(v, M) + T, v = M + _.length)
			}
			return m + c.slice(v)
		}]
	}));
	var To = Z.set,
		Do = Z.getterFor("Array Iterator"),
		ko = un(Array, "Array", (function(e, t) {
			To(this, {
				type: "Array Iterator",
				target: g(e),
				index: 0,
				kind: t
			})
		}), (function() {
			var e = Do(this),
				t = e.target,
				n = e.kind,
				r = e.index++;
			return !t || r >= t.length ? (e.target = void 0, {
				value: void 0,
				done: !0
			}) : "keys" == n ? {
				value: r,
				done: !1
			} : "values" == n ? {
				value: t[r],
				done: !1
			} : {
				value: [r, t[r]],
				done: !1
			}
		}), "values");
	_t.Arguments = _t.Array, to("keys"), to("values"), to("entries");
	var Ao = rt("iterator"),
		Oo = rt("toStringTag"),
		Ro = ko.values;
	for (var No in ft) {
		var Lo = r[No],
			wo = Lo && Lo.prototype;
		if (wo) {
			if (wo[Ao] !== Ro) try {
				O(wo, Ao, Ro)
			} catch (v_) {
				wo[Ao] = Ro
			}
			if (wo[Oo] || O(wo, Oo, No), ft[No])
				for (var bo in ko)
					if (wo[bo] !== ko[bo]) try {
						O(wo, bo, ko[bo])
					} catch (v_) {
						wo[bo] = ko[bo]
					}
		}
	}
	var Po = hn("slice"),
		Go = rt("species"),
		Uo = [].slice,
		qo = Math.max;
	Re({
		target: "Array",
		proto: !0,
		forced: !Po
	}, {
		slice: function(e, t) {
			var n, r, o, i = g(this),
				a = ue(i.length),
				s = pe(e, a),
				u = pe(void 0 === t ? a : t, a);
			if (Ke(i) && ("function" != typeof(n = i.constructor) || n !== Array && !Ke(n
					.prototype) ? m(n) && null === (n = n[Go]) && (n = void 0) : n = void 0, n ===
					Array || void 0 === n)) return Uo.call(i, s, u);
			for (r = new(void 0 === n ? Array : n)(qo(u - s, 0)), o = 0; s < u; s++, o++) s in i &&
				Et(r, o, i[s]);
			return r.length = o, r
		}
	});
	var xo = cr.trim,
		Fo = r.parseInt,
		Vo = /^[+-]?0[Xx]/,
		Bo = 8 !== Fo(or + "08") || 22 !== Fo(or + "0x16") ? function(e, t) {
			var n = xo(String(e));
			return Fo(n, t >>> 0 || (Vo.test(n) ? 16 : 10))
		} : Fo;
	Re({
		global: !0,
		forced: parseInt != Bo
	}, {
		parseInt: Bo
	});
	var jo = [].join,
		Ko = h != Object,
		Ho = ct("join", ",");
	Re({
		target: "Array",
		proto: !0,
		forced: Ko || !Ho
	}, {
		join: function(e) {
			return jo.call(g(this), void 0 === e ? "," : e)
		}
	});
	var $o = he.indexOf,
		zo = [].indexOf,
		Wo = !!zo && 1 / [1].indexOf(1, -0) < 0,
		Yo = ct("indexOf");
	Re({
		target: "Array",
		proto: !0,
		forced: Wo || !Yo
	}, {
		indexOf: function(e) {
			return Wo ? zo.apply(this, arguments) || 0 : $o(this, e, arguments.length > 1 ?
				arguments[1] : void 0)
		}
	});
	var Jo = ye.f,
		Xo = {}.toString,
		Qo = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(
			window) : [],
		Zo = {
			f: function(e) {
				return Qo && "[object Window]" == Xo.call(e) ? function(e) {
					try {
						return Jo(e)
					} catch (v_) {
						return Qo.slice()
					}
				}(e) : Jo(g(e))
			}
		},
		ei = Zo.f,
		ti = o((function() {
			return !Object.getOwnPropertyNames(1)
		}));
	Re({
		target: "Object",
		stat: !0,
		forced: ti
	}, {
		getOwnPropertyNames: ei
	});
	var ni = ut.find,
		ri = !0;
	"find" in [] && Array(1).find((function() {
		ri = !1
	})), Re({
		target: "Array",
		proto: !0,
		forced: ri
	}, {
		find: function(e) {
			return ni(this, e, arguments.length > 1 ? arguments[1] : void 0)
		}
	}), to("find");
	var oi, ii, ai, si = r.Promise,
		ui = function(e, t, n) {
			for (var r in t) ee(e, r, t[r], n);
			return e
		},
		ci = rt("species"),
		li = function(e) {
			var t = re(e),
				n = A.f;
			i && t && !t[ci] && n(t, ci, {
				configurable: !0,
				get: function() {
					return this
				}
			})
		},
		pi = function(e, t, n) {
			if (!(e instanceof t)) throw TypeError("Incorrect " + (n ? n + " " : "") + "invocation");
			return e
		},
		fi = function(e, t) {
			this.stopped = e, this.result = t
		},
		hi = function(e, t, n) {
			var r, o, i, a, s, u, c, l = n && n.that,
				p = !(!n || !n.AS_ENTRIES),
				f = !(!n || !n.IS_ITERATOR),
				h = !(!n || !n.INTERRUPTED),
				d = Be(t, l, 1 + p + h),
				g = function(e) {
					return r && vt(r), new fi(!0, e)
				},
				m = function(e) {
					return p ? (D(e), h ? d(e[0], e[1], g) : d(e[0], e[1])) : h ? d(e, g) : d(e)
				};
			if (f) r = e;
			else {
				if ("function" != typeof(o = Rt(e))) throw TypeError("Target is not iterable");
				if (Ct(o)) {
					for (i = 0, a = ue(e.length); a > i; i++)
						if ((s = m(e[i])) && s instanceof fi) return s;
					return new fi(!1)
				}
				r = o.call(e)
			}
			for (u = r.next; !(c = u.call(r)).done;) {
				try {
					s = m(c.value)
				} catch (v_) {
					throw vt(r), v_
				}
				if ("object" == typeof s && s && s instanceof fi) return s
			}
			return new fi(!1)
		},
		di = rt("species"),
		gi = function(e, t) {
			var n, r = D(e).constructor;
			return void 0 === r || null == (n = D(r)[di]) ? t : Ve(n)
		},
		mi = /(iphone|ipod|ipad).*applewebkit/i.test($e),
		vi = r.location,
		yi = r.setImmediate,
		_i = r.clearImmediate,
		Mi = r.process,
		Ii = r.MessageChannel,
		Ci = r.Dispatch,
		Ei = 0,
		Si = {},
		Ti = function(e) {
			if (Si.hasOwnProperty(e)) {
				var t = Si[e];
				delete Si[e], t()
			}
		},
		Di = function(e) {
			return function() {
				Ti(e)
			}
		},
		ki = function(e) {
			Ti(e.data)
		},
		Ai = function(e) {
			r.postMessage(e + "", vi.protocol + "//" + vi.host)
		};
	yi && _i || (yi = function(e) {
			for (var t = [], n = 1; arguments.length > n;) t.push(arguments[n++]);
			return Si[++Ei] = function() {
				("function" == typeof e ? e : Function(e)).apply(void 0, t)
			}, oi(Ei), Ei
		}, _i = function(e) {
			delete Si[e]
		}, He ? oi = function(e) {
			Mi.nextTick(Di(e))
		} : Ci && Ci.now ? oi = function(e) {
			Ci.now(Di(e))
		} : Ii && !mi ? (ai = (ii = new Ii).port2, ii.port1.onmessage = ki, oi = Be(ai.postMessage, ai,
		1)) : r.addEventListener && "function" == typeof postMessage && !r.importScripts && vi &&
		"file:" !== vi.protocol && !o(Ai) ? (oi = Ai, r.addEventListener("message", ki, !1)) : oi =
		"onreadystatechange" in C("script") ? function(e) {
			we.appendChild(C("script")).onreadystatechange = function() {
				we.removeChild(this), Ti(e)
			}
		} : function(e) {
			setTimeout(Di(e), 0)
		});
	var Oi, Ri, Ni, Li, wi, bi, Pi, Gi, Ui = {
			set: yi,
			clear: _i
		},
		qi = /web0s(?!.*chrome)/i.test($e),
		xi = T.f,
		Fi = Ui.set,
		Vi = r.MutationObserver || r.WebKitMutationObserver,
		Bi = r.document,
		ji = r.process,
		Ki = r.Promise,
		Hi = xi(r, "queueMicrotask"),
		$i = Hi && Hi.value;
	$i || (Oi = function() {
		var e, t;
		for (He && (e = ji.domain) && e.exit(); Ri;) {
			t = Ri.fn, Ri = Ri.next;
			try {
				t()
			} catch (v_) {
				throw Ri ? Li() : Ni = void 0, v_
			}
		}
		Ni = void 0, e && e.enter()
	}, mi || He || qi || !Vi || !Bi ? Ki && Ki.resolve ? (Pi = Ki.resolve(void 0), Gi = Pi.then, Li =
		function() {
			Gi.call(Pi, Oi)
		}) : Li = He ? function() {
		ji.nextTick(Oi)
	} : function() {
		Fi.call(r, Oi)
	} : (wi = !0, bi = Bi.createTextNode(""), new Vi(Oi).observe(bi, {
		characterData: !0
	}), Li = function() {
		bi.data = wi = !wi
	}));
	var zi, Wi, Yi, Ji, Xi = $i || function(e) {
			var t = {
				fn: e,
				next: void 0
			};
			Ni && (Ni.next = t), Ri || (Ri = t, Li()), Ni = t
		},
		Qi = function(e) {
			var t, n;
			this.promise = new e((function(e, r) {
				if (void 0 !== t || void 0 !== n) throw TypeError("Bad Promise constructor");
				t = e, n = r
			})), this.resolve = Ve(t), this.reject = Ve(n)
		},
		Zi = {
			f: function(e) {
				return new Qi(e)
			}
		},
		ea = function(e, t) {
			if (D(e), m(t) && t.constructor === e) return t;
			var n = Zi.f(e);
			return (0, n.resolve)(t), n.promise
		},
		ta = function(e) {
			try {
				return {
					error: !1,
					value: e()
				}
			} catch (v_) {
				return {
					error: !0,
					value: v_
				}
			}
		},
		na = Ui.set,
		ra = rt("species"),
		oa = "Promise",
		ia = Z.get,
		aa = Z.set,
		sa = Z.getterFor(oa),
		ua = si,
		ca = r.TypeError,
		la = r.document,
		pa = r.process,
		fa = re("fetch"),
		ha = Zi.f,
		da = ha,
		ga = !!(la && la.createEvent && r.dispatchEvent),
		ma = "function" == typeof PromiseRejectionEvent,
		va = Ae(oa, (function() {
			if (!(G(ua) !== String(ua))) {
				if (66 === Je) return !0;
				if (!He && !ma) return !0
			}
			if (Je >= 51 && /native code/.test(ua)) return !1;
			var e = ua.resolve(1),
				t = function(e) {
					e((function() {}), (function() {}))
				};
			return (e.constructor = {})[ra] = t, !(e.then((function() {})) instanceof t)
		})),
		ya = va || !Gt((function(e) {
			ua.all(e).catch((function() {}))
		})),
		_a = function(e) {
			var t;
			return !(!m(e) || "function" != typeof(t = e.then)) && t
		},
		Ma = function(e, t) {
			if (!e.notified) {
				e.notified = !0;
				var n = e.reactions;
				Xi((function() {
					for (var r = e.value, o = 1 == e.state, i = 0; n.length > i;) {
						var a, s, u, c = n[i++],
							l = o ? c.ok : c.fail,
							p = c.resolve,
							f = c.reject,
							h = c.domain;
						try {
							l ? (o || (2 === e.rejection && Sa(e), e.rejection = 1), !0 === l ? a =
								r : (h && h.enter(), a = l(r), h && (h.exit(), u = !0)), a === c
								.promise ? f(ca("Promise-chain cycle")) : (s = _a(a)) ? s.call(
									a, p, f) : p(a)) : f(r)
						} catch (v_) {
							h && !u && h.exit(), f(v_)
						}
					}
					e.reactions = [], e.notified = !1, t && !e.rejection && Ca(e)
				}))
			}
		},
		Ia = function(e, t, n) {
			var o, i;
			ga ? ((o = la.createEvent("Event")).promise = t, o.reason = n, o.initEvent(e, !1, !0), r
				.dispatchEvent(o)) : o = {
				promise: t,
				reason: n
			}, !ma && (i = r["on" + e]) ? i(o) : "unhandledrejection" === e && function(e, t) {
				var n = r.console;
				n && n.error && (1 === arguments.length ? n.error(e) : n.error(e, t))
			}("Unhandled promise rejection", n)
		},
		Ca = function(e) {
			na.call(r, (function() {
				var t, n = e.facade,
					r = e.value;
				if (Ea(e) && (t = ta((function() {
						He ? pa.emit("unhandledRejection", r, n) : Ia(
							"unhandledrejection", n, r)
					})), e.rejection = He || Ea(e) ? 2 : 1, t.error)) throw t.value
			}))
		},
		Ea = function(e) {
			return 1 !== e.rejection && !e.parent
		},
		Sa = function(e) {
			na.call(r, (function() {
				var t = e.facade;
				He ? pa.emit("rejectionHandled", t) : Ia("rejectionhandled", t, e.value)
			}))
		},
		Ta = function(e, t, n) {
			return function(r) {
				e(t, r, n)
			}
		},
		Da = function(e, t, n) {
			e.done || (e.done = !0, n && (e = n), e.value = t, e.state = 2, Ma(e, !0))
		},
		ka = function(e, t, n) {
			if (!e.done) {
				e.done = !0, n && (e = n);
				try {
					if (e.facade === t) throw ca("Promise can't be resolved itself");
					var r = _a(t);
					r ? Xi((function() {
						var n = {
							done: !1
						};
						try {
							r.call(t, Ta(ka, n, e), Ta(Da, n, e))
						} catch (v_) {
							Da(n, v_, e)
						}
					})) : (e.value = t, e.state = 1, Ma(e, !1))
				} catch (v_) {
					Da({
						done: !1
					}, v_, e)
				}
			}
		};
	va && (ua = function(e) {
		pi(this, ua, oa), Ve(e), zi.call(this);
		var t = ia(this);
		try {
			e(Ta(ka, t), Ta(Da, t))
		} catch (v_) {
			Da(t, v_)
		}
	}, (zi = function(e) {
		aa(this, {
			type: oa,
			done: !1,
			notified: !1,
			parent: !1,
			reactions: [],
			rejection: !1,
			state: 0,
			value: void 0
		})
	}).prototype = ui(ua.prototype, {
		then: function(e, t) {
			var n = sa(this),
				r = ha(gi(this, ua));
			return r.ok = "function" != typeof e || e, r.fail = "function" == typeof t && t, r
				.domain = He ? pa.domain : void 0, n.parent = !0, n.reactions.push(r), 0 != n
				.state && Ma(n, !1), r.promise
		},
		catch: function(e) {
			return this.then(void 0, e)
		}
	}), Wi = function() {
		var e = new zi,
			t = ia(e);
		this.promise = e, this.resolve = Ta(ka, t), this.reject = Ta(Da, t)
	}, Zi.f = ha = function(e) {
		return e === ua || e === Yi ? new Wi(e) : da(e)
	}, "function" == typeof si && (Ji = si.prototype.then, ee(si.prototype, "then", (function(e, t) {
		var n = this;
		return new ua((function(e, t) {
			Ji.call(n, e, t)
		})).then(e, t)
	}), {
		unsafe: !0
	}), "function" == typeof fa && Re({
		global: !0,
		enumerable: !0,
		forced: !0
	}, {
		fetch: function(e) {
			return ea(ua, fa.apply(r, arguments))
		}
	}))), Re({
		global: !0,
		wrap: !0,
		forced: va
	}, {
		Promise: ua
	}), Qt(ua, oa, !1), li(oa), Yi = re(oa), Re({
		target: oa,
		stat: !0,
		forced: va
	}, {
		reject: function(e) {
			var t = ha(this);
			return t.reject.call(void 0, e), t.promise
		}
	}), Re({
		target: oa,
		stat: !0,
		forced: va
	}, {
		resolve: function(e) {
			return ea(this, e)
		}
	}), Re({
		target: oa,
		stat: !0,
		forced: ya
	}, {
		all: function(e) {
			var t = this,
				n = ha(t),
				r = n.resolve,
				o = n.reject,
				i = ta((function() {
					var n = Ve(t.resolve),
						i = [],
						a = 0,
						s = 1;
					hi(e, (function(e) {
						var u = a++,
							c = !1;
						i.push(void 0), s++, n.call(t, e).then((function(e) {
							c || (c = !0, i[u] = e, --s || r(i))
						}), o)
					})), --s || r(i)
				}));
			return i.error && o(i.value), n.promise
		},
		race: function(e) {
			var t = this,
				n = ha(t),
				r = n.reject,
				o = ta((function() {
					var o = Ve(t.resolve);
					hi(e, (function(e) {
						o.call(t, e).then(n.resolve, r)
					}))
				}));
			return o.error && r(o.value), n.promise
		}
	});
	var Aa = Bt.codeAt;
	Re({
		target: "String",
		proto: !0
	}, {
		codePointAt: function(e) {
			return Aa(this, e)
		}
	});
	var Oa = cr.trim,
		Ra = r.parseFloat,
		Na = 1 / Ra(or + "-0") != -Infinity ? function(e) {
			var t = Oa(String(e)),
				n = Ra(t);
			return 0 === n && "-" == t.charAt(0) ? -0 : n
		} : Ra;
	Re({
		global: !0,
		forced: parseFloat != Na
	}, {
		parseFloat: Na
	});
	var La, wa, ba, Pa = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync,
		Ga = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync,
		Ua = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync,
		qa = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync,
		xa = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync,
		Fa = Pa || Ga || Ua || qa || xa,
		Va = "undefined" != typeof window && !Fa,
		Ba = Ga ? qq : Ua ? tt : qa ? swan : xa ? my : Pa ? wx : {},
		ja = (La = "web", rs ? La = "wechat" : Ga ? La = "qqmp" : Ua ? La = "ttmp" : qa ? La = "baidump" : xa ?
			La = "alipaymp" : Pa && (La = "wxmp"), La),
		Ka = Va && window.navigator && window.navigator.userAgent || "",
		Ha = /AppleWebKit\/([\d.]+)/i.exec(Ka),
		$a = (Ha && parseFloat(Ha.pop()), /iPad/i.test(Ka)),
		za = /iPhone/i.test(Ka) && !$a,
		Wa = /iPod/i.test(Ka),
		Ya = za || $a || Wa,
		Ja = (function() {
			var e = Ka.match(/OS (\d+)_/i);
			e && e[1] && e[1]
		}(), /Android/i.test(Ka)),
		Xa = function() {
			var e = Ka.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);
			if (!e) return null;
			var t = e[1] && parseFloat(e[1]),
				n = e[2] && parseFloat(e[2]);
			return t && n ? parseFloat(e[1] + "." + e[2]) : t || null
		}(),
		Qa = (Ja && /webkit/i.test(Ka), /Firefox/i.test(Ka), /Edge/i.test(Ka)),
		Za = !Qa && /Chrome/i.test(Ka),
		es = (function() {
			var e = Ka.match(/Chrome\/(\d+)/);
			e && e[1] && parseFloat(e[1])
		}(), /MSIE/.test(Ka)),
		ts = (/MSIE\s8\.0/.test(Ka), function() {
			var e = /MSIE\s(\d+)\.\d/.exec(Ka),
				t = e && parseFloat(e[1]);
			return !t && /Trident\/7.0/i.test(Ka) && /rv:11.0/.test(Ka) && (t = 11), t
		}()),
		ns = (/Safari/i.test(Ka), /TBS\/\d+/i.test(Ka)),
		rs = (function() {
				var e = Ka.match(/TBS\/(\d+)/i);
				if (e && e[1]) e[1]
			}(), !ns && /MQQBrowser\/\d+/i.test(Ka), !ns && / QQBrowser\/\d+/i.test(Ka),
			/(micromessenger|webbrowser)/i.test(Ka)),
		os = /Windows/i.test(Ka),
		is = /MAC OS X/i.test(Ka),
		as = (/MicroMessenger/i.test(Ka), !o((function() {
			return Object.isExtensible(Object.preventExtensions({}))
		}))),
		ss = t((function(e) {
			var t = A.f,
				n = B("meta"),
				r = 0,
				o = Object.isExtensible || function() {
					return !0
				},
				i = function(e) {
					t(e, n, {
						value: {
							objectID: "O" + ++r,
							weakData: {}
						}
					})
				},
				a = e.exports = {
					REQUIRED: !1,
					fastKey: function(e, t) {
						if (!m(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" :
							"P") + e;
						if (!_(e, n)) {
							if (!o(e)) return "F";
							if (!t) return "E";
							i(e)
						}
						return e[n].objectID
					},
					getWeakData: function(e, t) {
						if (!_(e, n)) {
							if (!o(e)) return !0;
							if (!t) return !1;
							i(e)
						}
						return e[n].weakData
					},
					onFreeze: function(e) {
						return as && a.REQUIRED && o(e) && !_(e, n) && i(e), e
					}
				};
			H[n] = !0
		})),
		us = (ss.REQUIRED, ss.fastKey, ss.getWeakData, ss.onFreeze, A.f),
		cs = ss.fastKey,
		ls = Z.set,
		ps = Z.getterFor,
		fs = (function(e, t, n) {
				var i = -1 !== e.indexOf("Map"),
					a = -1 !== e.indexOf("Weak"),
					s = i ? "set" : "add",
					u = r[e],
					c = u && u.prototype,
					l = u,
					p = {},
					f = function(e) {
						var t = c[e];
						ee(c, e, "add" == e ? function(e) {
							return t.call(this, 0 === e ? 0 : e), this
						} : "delete" == e ? function(e) {
							return !(a && !m(e)) && t.call(this, 0 === e ? 0 : e)
						} : "get" == e ? function(e) {
							return a && !m(e) ? void 0 : t.call(this, 0 === e ? 0 : e)
						} : "has" == e ? function(e) {
							return !(a && !m(e)) && t.call(this, 0 === e ? 0 : e)
						} : function(e, n) {
							return t.call(this, 0 === e ? 0 : e, n), this
						})
					};
				if (Ae(e, "function" != typeof u || !(a || c.forEach && !o((function() {
						(new u).entries().next()
					}))))) l = n.getConstructor(t, e, i, s), ss.REQUIRED = !0;
				else if (Ae(e, !0)) {
					var h = new l,
						d = h[s](a ? {} : -0, 1) != h,
						g = o((function() {
							h.has(1)
						})),
						v = Gt((function(e) {
							new u(e)
						})),
						y = !a && o((function() {
							for (var e = new u, t = 5; t--;) e[s](t, t);
							return !e.has(-0)
						}));
					v || ((l = t((function(t, n) {
						pi(t, l, e);
						var r = rr(new u, t, l);
						return null != n && hi(n, r[s], {
							that: r,
							AS_ENTRIES: i
						}), r
					}))).prototype = c, c.constructor = l), (g || y) && (f("delete"), f("has"), i && f(
						"get")), (y || d) && f(s), a && c.clear && delete c.clear
				}
				p[e] = l, Re({
					global: !0,
					forced: l != u
				}, p), Qt(l, e), a || n.setStrong(l, e, i)
			}("Map", (function(e) {
				return function() {
					return e(this, arguments.length ? arguments[0] : void 0)
				}
			}), {
				getConstructor: function(e, t, n, r) {
					var o = e((function(e, a) {
							pi(e, o, t), ls(e, {
								type: t,
								index: qe(null),
								first: void 0,
								last: void 0,
								size: 0
							}), i || (e.size = 0), null != a && hi(a, e[r], {
								that: e,
								AS_ENTRIES: n
							})
						})),
						a = ps(t),
						s = function(e, t, n) {
							var r, o, s = a(e),
								c = u(e, t);
							return c ? c.value = n : (s.last = c = {
									index: o = cs(t, !0),
									key: t,
									value: n,
									previous: r = s.last,
									next: void 0,
									removed: !1
								}, s.first || (s.first = c), r && (r.next = c), i ? s.size++ : e
								.size++, "F" !== o && (s.index[o] = c)), e
						},
						u = function(e, t) {
							var n, r = a(e),
								o = cs(t);
							if ("F" !== o) return r.index[o];
							for (n = r.first; n; n = n.next)
								if (n.key == t) return n
						};
					return ui(o.prototype, {
						clear: function() {
							for (var e = a(this), t = e.index, n = e.first; n;) n
								.removed = !0, n.previous && (n.previous = n.previous.next =
									void 0), delete t[n.index], n = n.next;
							e.first = e.last = void 0, i ? e.size = 0 : this.size = 0
						},
						delete: function(e) {
							var t = a(this),
								n = u(this, e);
							if (n) {
								var r = n.next,
									o = n.previous;
								delete t.index[n.index], n.removed = !0, o && (o.next = r),
									r && (r.previous = o), t.first == n && (t.first = r), t
									.last == n && (t.last = o), i ? t.size-- : this.size--
							}
							return !!n
						},
						forEach: function(e) {
							for (var t, n = a(this), r = Be(e, arguments.length > 1 ?
									arguments[1] : void 0, 3); t = t ? t.next : n.first;)
								for (r(t.value, t.key, this); t && t.removed;) t = t
									.previous
						},
						has: function(e) {
							return !!u(this, e)
						}
					}), ui(o.prototype, n ? {
						get: function(e) {
							var t = u(this, e);
							return t && t.value
						},
						set: function(e, t) {
							return s(this, 0 === e ? 0 : e, t)
						}
					} : {
						add: function(e) {
							return s(this, e = 0 === e ? 0 : e, e)
						}
					}), i && us(o.prototype, "size", {
						get: function() {
							return a(this).size
						}
					}), o
				},
				setStrong: function(e, t, n) {
					var r = t + " Iterator",
						o = ps(t),
						i = ps(r);
					un(e, t, (function(e, t) {
						ls(this, {
							type: r,
							target: e,
							state: o(e),
							kind: t,
							last: void 0
						})
					}), (function() {
						for (var e = i(this), t = e.kind, n = e.last; n && n.removed;) n = n
							.previous;
						return e.target && (e.last = n = n ? n.next : e.state.first) ?
							"keys" == t ? {
								value: n.key,
								done: !1
							} : "values" == t ? {
								value: n.value,
								done: !1
							} : {
								value: [n.key, n.value],
								done: !1
							} : (e.target = void 0, {
								value: void 0,
								done: !0
							})
					}), n ? "entries" : "values", !n, !0), li(t)
				}
			}), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" !=
			typeof window ? window : {});
	wa = "undefined" != typeof console ? console : void 0 !== fs && fs.console ? fs.console : "undefined" !=
		typeof window && window.console ? window.console : {};
	for (var hs = function() {}, ds = ["assert", "clear", "count", "debug", "dir", "dirxml", "error",
			"exception", "group", "groupCollapsed", "groupEnd", "info", "log", "markTimeline", "profile",
			"profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"
		], gs = ds.length; gs--;) ba = ds[gs], console[ba] || (wa[ba] = hs);
	wa.methods = ds;
	var ms = wa,
		vs = 0,
		ys = new Map;

	function _s() {
		var e = new Date;
		return "TIM " + e.toLocaleTimeString("en-US", {
			hour12: !1
		}) + "." + function(e) {
			var t;
			switch (e.toString().length) {
				case 1:
					t = "00" + e;
					break;
				case 2:
					t = "0" + e;
					break;
				default:
					t = e
			}
			return t
		}(e.getMilliseconds()) + ":"
	}
	var Ms = {
			arguments2String: function(e) {
				var t;
				if (1 === e.length) t = _s() + e[0];
				else {
					t = _s();
					for (var n = 0, r = e.length; n < r; n++) As(e[n]) ? Rs(e[n]) ? t += Gs(e[n]) : t +=
						JSON.stringify(e[n]) : t += e[n], t += " "
				}
				return t
			},
			debug: function() {
				if (vs <= -1) {
					var e = this.arguments2String(arguments);
					ms.debug(e)
				}
			},
			log: function() {
				if (vs <= 0) {
					var e = this.arguments2String(arguments);
					ms.log(e)
				}
			},
			info: function() {
				if (vs <= 1) {
					var e = this.arguments2String(arguments);
					ms.info(e)
				}
			},
			warn: function() {
				if (vs <= 2) {
					var e = this.arguments2String(arguments);
					ms.warn(e)
				}
			},
			error: function() {
				if (vs <= 3) {
					var e = this.arguments2String(arguments);
					ms.error(e)
				}
			},
			time: function(e) {
				ys.set(e, bs.now())
			},
			timeEnd: function(e) {
				if (ys.has(e)) {
					var t = bs.now() - ys.get(e);
					return ys.delete(e), t
				}
				return ms.warn("未找到对应label: ".concat(e, ", 请在调用 logger.timeEnd 前，调用 logger.time")), 0
			},
			setLevel: function(e) {
				e < 4 && ms.log(_s() + "set level from " + vs + " to " + e), vs = e
			}
		},
		Is = function(e) {
			return "file" === Ns(e)
		},
		Cs = function(e) {
			return null !== e && ("number" == typeof e && !isNaN(e - 0) || "object" === Mn(e) && e
				.constructor === Number)
		},
		Es = function(e) {
			return "string" == typeof e
		},
		Ss = function(e) {
			return null !== e && "object" === Mn(e)
		},
		Ts = function(e) {
			if ("object" !== Mn(e) || null === e) return !1;
			var t = Object.getPrototypeOf(e);
			if (null === t) return !0;
			for (var n = t; null !== Object.getPrototypeOf(n);) n = Object.getPrototypeOf(n);
			return t === n
		},
		Ds = function(e) {
			return "function" == typeof Array.isArray ? Array.isArray(e) : "array" === Ns(e)
		},
		ks = function(e) {
			return void 0 === e
		},
		As = function(e) {
			return Ds(e) || Ss(e)
		},
		Os = function(e) {
			return "function" == typeof e
		},
		Rs = function(e) {
			return e instanceof Error
		},
		Ns = function(e) {
			return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()
		},
		Ls = function(e) {
			if ("string" != typeof e) return !1;
			var t = e[0];
			return !/[^a-zA-Z0-9]/.test(t)
		},
		ws = 0;
	Date.now || (Date.now = function() {
		return (new Date).getTime()
	});
	var bs = {
			now: function() {
				0 === ws && (ws = Date.now() - 1);
				var e = Date.now() - ws;
				return e > 4294967295 ? (ws += 4294967295, Date.now() - ws) : e
			},
			utc: function() {
				return Math.round(Date.now() / 1e3)
			}
		},
		Ps = function e(t, n, r, o) {
			if (!As(t) || !As(n)) return 0;
			for (var i, a = 0, s = Object.keys(n), u = 0, c = s.length; u < c; u++)
				if (i = s[u], !(ks(n[i]) || r && r.includes(i)))
					if (As(t[i]) && As(n[i])) a += e(t[i], n[i], r, o);
					else {
						if (o && o.includes(n[i])) continue;
						t[i] !== n[i] && (t[i] = n[i], a += 1)
					} return a
		},
		Gs = function(e) {
			return JSON.stringify(e, ["message", "code"])
		},
		Us = function() {
			var e = new Date,
				t = e.toISOString(),
				n = e.getTimezoneOffset() / 60,
				r = "";
			return r = n < 0 ? n > -10 ? "+0" + Math.abs(100 * n) : "+" + Math.abs(100 * n) : n >= 10 ? "-" +
				100 * n : "-0" + 100 * n, t.replace("Z", r)
		},
		qs = function(e) {
			if (0 === e.length) return 0;
			for (var t = 0, n = 0, r = "undefined" != typeof document && void 0 !== document.characterSet ?
					document.characterSet : "UTF-8"; void 0 !== e[t];) n += e[t++].charCodeAt[t] <= 255 ? 1 : !
				1 === r ? 3 : 2;
			return n
		},
		xs = function(e) {
			var t = e || 99999999;
			return Math.round(Math.random() * t)
		},
		Fs = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
		Vs = Fs.length,
		Bs = function(e, t) {
			for (var n in e)
				if (e[n] === t) return !0;
			return !1
		},
		js = {},
		Ks = function() {
			if (Fa) return "https:";
			var e = window.location.protocol;
			return ["http:", "https:"].indexOf(e) < 0 && (e = "http:"), e
		},
		Hs = function(e) {
			return -1 === e.indexOf("http://") || -1 === e.indexOf("https://") ? "https://" + e : e.replace(
				/https|http/, "https")
		};

	function $s(e, t) {
		Ds(e) && Ds(t) ? t.forEach((function(t) {
			var n = t.key,
				r = t.value,
				o = e.find((function(e) {
					return e.key === n
				}));
			o ? o.value = r : e.push({
				key: n,
				value: r
			})
		})) : Ms.warn("updateCustomField target 或 source 不是数组，忽略此次更新。")
	}
	var zs = function(e) {
			return e === _n.GRP_WORK
		},
		Ws = function(e) {
			return e === _n.GRP_PUBLIC
		},
		Ys = function(e) {
			return e === _n.GRP_MEETING
		},
		Js = function(e) {
			return e === _n.GRP_AVCHATROOM
		},
		Xs = function(e) {
			return Es(e) && e === _n.CONV_SYSTEM
		};

	function Qs(e, t) {
		var n = {};
		return Object.keys(e).forEach((function(r) {
			n[r] = t(e[r], r)
		})), n
	}

	function Zs() {
		return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
	}

	function eu() {
		return "".concat(Zs() + Zs()).concat(Zs()).concat(Zs()).concat(Zs()).concat(Zs()).concat(Zs()).concat(
			Zs())
	}

	function tu(e) {
		var t = e.originUrl,
			n = void 0 === t ? void 0 : t,
			r = e.originWidth,
			o = e.originHeight,
			i = e.min,
			a = void 0 === i ? 198 : i,
			s = parseInt(r),
			u = parseInt(o),
			c = {
				url: void 0,
				width: 0,
				height: 0
			};
		return (s <= u ? s : u) <= a ? (c.url = n, c.width = s, c.height = u) : (u <= s ? (c.width = Math.ceil(
			s * a / u), c.height = a) : (c.width = a, c.height = Math.ceil(u * a / s)), n && n.indexOf(
			"?") >= 0 ? c.url = "".concat(n, 198 === a ? "&imageView2/3/w/198/h/198" :
			"&imageView2/3/w/720/h/720") : c.url = "".concat(n, 198 === a ?
			"?imageView2/3/w/198/h/198" : "?imageView2/3/w/720/h/720")), ks(n) ? wn(c, ["url"]) : c
	}

	function nu(e) {
		var t = e[2];
		e[2] = e[1], e[1] = t;
		for (var n = 0; n < e.length; n++) e[n].setType(n)
	}
	var ru = Object.prototype.hasOwnProperty;

	function ou(e) {
		if (null == e) return !0;
		if ("boolean" == typeof e) return !1;
		if ("number" == typeof e) return 0 === e;
		if ("string" == typeof e) return 0 === e.length;
		if ("function" == typeof e) return 0 === e.length;
		if (Array.isArray(e)) return 0 === e.length;
		if (e instanceof Error) return "" === e.message;
		if (Ts(e)) {
			for (var t in e)
				if (ru.call(e, t)) return !1;
			return !0
		}
		return !("map" !== Ns(e) && ! function(e) {
			return "set" === Ns(e)
		}(e) && !Is(e)) && 0 === e.size
	}

	function iu(e, t, n) {
		if (void 0 === t) return !0;
		var r = !0;
		if ("object" === nr(t).toLowerCase()) Object.keys(t).forEach((function(o) {
			var i = 1 === e.length ? e[0][o] : void 0;
			r = !!au(i, t[o], n, o) && r
		}));
		else if ("array" === nr(t).toLowerCase())
			for (var o = 0; o < t.length; o++) r = !!au(e[o], t[o], n, t[o].name) && r;
		if (r) return r;
		throw new Error("Params validate failed.")
	}

	function au(e, t, n, r) {
		if (void 0 === t) return !0;
		var o = !0;
		return t.required && ou(e) && (ms.error("TIM [".concat(n, '] Missing required params: "').concat(r,
			'".')), o = !1), ou(e) || nr(e).toLowerCase() === t.type.toLowerCase() || (ms.error("TIM ["
			.concat(n, '] Invalid params: type check failed for "').concat(r, '".Expected ').concat(t
				.type, ".")), o = !1), t.validator && !t.validator(e) && (ms.error("TIM [".concat(n,
			"] Invalid params: custom validator check failed for params.")), o = !1), o
	}
	var su = {
			f: rt
		},
		uu = A.f,
		cu = ut.forEach,
		lu = K("hidden"),
		pu = rt("toPrimitive"),
		fu = Z.set,
		hu = Z.getterFor("Symbol"),
		du = Object.prototype,
		gu = r.Symbol,
		mu = re("JSON", "stringify"),
		vu = T.f,
		yu = A.f,
		_u = Zo.f,
		Mu = u.f,
		Iu = x("symbols"),
		Cu = x("op-symbols"),
		Eu = x("string-to-symbol-registry"),
		Su = x("symbol-to-string-registry"),
		Tu = x("wks"),
		Du = r.QObject,
		ku = !Du || !Du.prototype || !Du.prototype.findChild,
		Au = i && o((function() {
			return 7 != qe(yu({}, "a", {
				get: function() {
					return yu(this, "a", {
						value: 7
					}).a
				}
			})).a
		})) ? function(e, t, n) {
			var r = vu(du, t);
			r && delete du[t], yu(e, t, n), r && e !== du && yu(du, t, r)
		} : yu,
		Ou = function(e, t) {
			var n = Iu[e] = qe(gu.prototype);
			return fu(n, {
				type: "Symbol",
				tag: e,
				description: t
			}), i || (n.description = t), n
		},
		Ru = Qe ? function(e) {
			return "symbol" == typeof e
		} : function(e) {
			return Object(e) instanceof gu
		},
		Nu = function(e, t, n) {
			e === du && Nu(Cu, t, n), D(e);
			var r = v(t, !0);
			return D(n), _(Iu, r) ? (n.enumerable ? (_(e, lu) && e[lu][r] && (e[lu][r] = !1), n = qe(n, {
				enumerable: c(0, !1)
			})) : (_(e, lu) || yu(e, lu, c(1, {})), e[lu][r] = !0), Au(e, r, n)) : yu(e, r, n)
		},
		Lu = function(e, t) {
			D(e);
			var n = g(t),
				r = Ne(n).concat(Gu(n));
			return cu(r, (function(t) {
				i && !wu.call(n, t) || Nu(e, t, n[t])
			})), e
		},
		wu = function(e) {
			var t = v(e, !0),
				n = Mu.call(this, t);
			return !(this === du && _(Iu, t) && !_(Cu, t)) && (!(n || !_(this, t) || !_(Iu, t) || _(this, lu) &&
				this[lu][t]) || n)
		},
		bu = function(e, t) {
			var n = g(e),
				r = v(t, !0);
			if (n !== du || !_(Iu, r) || _(Cu, r)) {
				var o = vu(n, r);
				return !o || !_(Iu, r) || _(n, lu) && n[lu][r] || (o.enumerable = !0), o
			}
		},
		Pu = function(e) {
			var t = _u(g(e)),
				n = [];
			return cu(t, (function(e) {
				_(Iu, e) || _(H, e) || n.push(e)
			})), n
		},
		Gu = function(e) {
			var t = e === du,
				n = _u(t ? Cu : g(e)),
				r = [];
			return cu(n, (function(e) {
				!_(Iu, e) || t && !_(du, e) || r.push(Iu[e])
			})), r
		};
	if (Xe || (ee((gu = function() {
			if (this instanceof gu) throw TypeError("Symbol is not a constructor");
			var e = arguments.length && void 0 !== arguments[0] ? String(arguments[0]) : void 0,
				t = B(e),
				n = function(e) {
					this === du && n.call(Cu, e), _(this, lu) && _(this[lu], t) && (this[lu][t] = !
						1), Au(this, t, c(1, e))
				};
			return i && ku && Au(du, t, {
				configurable: !0,
				set: n
			}), Ou(t, e)
		}).prototype, "toString", (function() {
			return hu(this).tag
		})), ee(gu, "withoutSetter", (function(e) {
			return Ou(B(e), e)
		})), u.f = wu, A.f = Nu, T.f = bu, ye.f = Zo.f = Pu, _e.f = Gu, su.f = function(e) {
			return Ou(rt(e), e)
		}, i && (yu(gu.prototype, "description", {
			configurable: !0,
			get: function() {
				return hu(this).description
			}
		}), ee(du, "propertyIsEnumerable", wu, {
			unsafe: !0
		}))), Re({
			global: !0,
			wrap: !0,
			forced: !Xe,
			sham: !Xe
		}, {
			Symbol: gu
		}), cu(Ne(Tu), (function(e) {
			! function(e) {
				var t = te.Symbol || (te.Symbol = {});
				_(t, e) || uu(t, e, {
					value: su.f(e)
				})
			}(e)
		})), Re({
			target: "Symbol",
			stat: !0,
			forced: !Xe
		}, {
			for: function(e) {
				var t = String(e);
				if (_(Eu, t)) return Eu[t];
				var n = gu(t);
				return Eu[t] = n, Su[n] = t, n
			},
			keyFor: function(e) {
				if (!Ru(e)) throw TypeError(e + " is not a symbol");
				if (_(Su, e)) return Su[e]
			},
			useSetter: function() {
				ku = !0
			},
			useSimple: function() {
				ku = !1
			}
		}), Re({
			target: "Object",
			stat: !0,
			forced: !Xe,
			sham: !i
		}, {
			create: function(e, t) {
				return void 0 === t ? qe(e) : Lu(qe(e), t)
			},
			defineProperty: Nu,
			defineProperties: Lu,
			getOwnPropertyDescriptor: bu
		}), Re({
			target: "Object",
			stat: !0,
			forced: !Xe
		}, {
			getOwnPropertyNames: Pu,
			getOwnPropertySymbols: Gu
		}), Re({
			target: "Object",
			stat: !0,
			forced: o((function() {
				_e.f(1)
			}))
		}, {
			getOwnPropertySymbols: function(e) {
				return _e.f(je(e))
			}
		}), mu) {
		var Uu = !Xe || o((function() {
			var e = gu();
			return "[null]" != mu([e]) || "{}" != mu({
				a: e
			}) || "{}" != mu(Object(e))
		}));
		Re({
			target: "JSON",
			stat: !0,
			forced: Uu
		}, {
			stringify: function(e, t, n) {
				for (var r, o = [e], i = 1; arguments.length > i;) o.push(arguments[i++]);
				if (r = t, (m(t) || void 0 !== e) && !Ru(e)) return Ke(t) || (t = function(e, t) {
					if ("function" == typeof r && (t = r.call(this, e, t)), !Ru(t))
						return t
				}), o[1] = t, mu.apply(null, o)
			}
		})
	}
	gu.prototype[pu] || O(gu.prototype, pu, gu.prototype.valueOf), Qt(gu, "Symbol"), H[lu] = !0;
	var qu = A.f,
		xu = r.Symbol;
	if (i && "function" == typeof xu && (!("description" in xu.prototype) || void 0 !== xu().description)) {
		var Fu = {},
			Vu = function() {
				var e = arguments.length < 1 || void 0 === arguments[0] ? void 0 : String(arguments[0]),
					t = this instanceof Vu ? new xu(e) : void 0 === e ? xu() : xu(e);
				return "" === e && (Fu[t] = !0), t
			};
		Ie(Vu, xu);
		var Bu = Vu.prototype = xu.prototype;
		Bu.constructor = Vu;
		var ju = Bu.toString,
			Ku = "Symbol(test)" == String(xu("test")),
			Hu = /^Symbol\((.*)\)[^)]+$/;
		qu(Bu, "description", {
			configurable: !0,
			get: function() {
				var e = m(this) ? this.valueOf() : this,
					t = ju.call(e);
				if (_(Fu, e)) return "";
				var n = Ku ? t.slice(7, -1) : t.replace(Hu, "$1");
				return "" === n ? void 0 : n
			}
		}), Re({
			global: !0,
			forced: !0
		}, {
			Symbol: Vu
		})
	}
	var $u = u.f,
		zu = function(e) {
			return function(t) {
				for (var n, r = g(t), o = Ne(r), a = o.length, s = 0, u = []; a > s;) n = o[s++], i && !$u
					.call(r, n) || u.push(e ? [n, r[n]] : r[n]);
				return u
			}
		},
		Wu = {
			entries: zu(!0),
			values: zu(!1)
		}.values;
	Re({
		target: "Object",
		stat: !0
	}, {
		values: function(e) {
			return Wu(e)
		}
	});
	var Yu = {
			SUCCESS: "JoinedSuccess",
			WAIT_APPROVAL: "WaitAdminApproval"
		},
		Ju = {
			SUCCESS: 0
		},
		Xu = {
			IS_LOGIN: 1,
			IS_NOT_LOGIN: 0
		},
		Qu = {
			UNSEND: "unSend",
			SUCCESS: "success",
			FAIL: "fail"
		},
		Zu = {
			NOT_START: "notStart",
			PENDING: "pengding",
			RESOLVED: "resolved",
			REJECTED: "rejected"
		},
		ec = function() {
			function e(t) {
				In(this, e), this.type = _n.MSG_TEXT, this.content = {
					text: t.text || ""
				}
			}
			return En(e, [{
				key: "setText",
				value: function(e) {
					this.content.text = e
				}
			}, {
				key: "sendable",
				value: function() {
					return 0 !== this.content.text.length
				}
			}]), e
		}(),
		tc = rt("iterator"),
		nc = !o((function() {
			var e = new URL("b?a=1&b=2&c=3", "http://a"),
				t = e.searchParams,
				n = "";
			return e.pathname = "c%20d", t.forEach((function(e, r) {
					t.delete("b"), n += r + e
				})), !t.sort || "http://a/c%20d?a=1&c=3" !== e.href || "3" !== t.get("c") || "a=1" !==
				String(new URLSearchParams("?a=1")) || !t[tc] || "a" !== new URL("https://a@b")
				.username || "b" !== new URLSearchParams(new URLSearchParams("a=b")).get("a") ||
				"xn--e1aybc" !== new URL("http://тест").host || "#%D0%B1" !== new URL("http://a#б")
				.hash || "a1c3" !== n || "x" !== new URL("http://x", void 0).host
		})),
		rc = Object.assign,
		oc = Object.defineProperty,
		ic = !rc || o((function() {
			if (i && 1 !== rc({
					b: 1
				}, rc(oc({}, "a", {
					enumerable: !0,
					get: function() {
						oc(this, "b", {
							value: 3,
							enumerable: !1
						})
					}
				}), {
					b: 2
				})).b) return !0;
			var e = {},
				t = {},
				n = Symbol();
			return e[n] = 7, "abcdefghijklmnopqrst".split("").forEach((function(e) {
				t[e] = e
			})), 7 != rc({}, e)[n] || "abcdefghijklmnopqrst" != Ne(rc({}, t)).join("")
		})) ? function(e, t) {
			for (var n = je(e), r = arguments.length, o = 1, a = _e.f, s = u.f; r > o;)
				for (var c, l = h(arguments[o++]), p = a ? Ne(l).concat(a(l)) : Ne(l), f = p.length, d = 0; f >
					d;) c = p[d++], i && !s.call(l, c) || (n[c] = l[c]);
			return n
		} : rc,
		ac = /[^\0-\u007E]/,
		sc = /[.\u3002\uFF0E\uFF61]/g,
		uc = "Overflow: input needs wider integers to process",
		cc = Math.floor,
		lc = String.fromCharCode,
		pc = function(e) {
			return e + 22 + 75 * (e < 26)
		},
		fc = function(e, t, n) {
			var r = 0;
			for (e = n ? cc(e / 700) : e >> 1, e += cc(e / t); e > 455; r += 36) e = cc(e / 35);
			return cc(r + 36 * e / (e + 38))
		},
		hc = function(e) {
			var t, n, r = [],
				o = (e = function(e) {
					for (var t = [], n = 0, r = e.length; n < r;) {
						var o = e.charCodeAt(n++);
						if (o >= 55296 && o <= 56319 && n < r) {
							var i = e.charCodeAt(n++);
							56320 == (64512 & i) ? t.push(((1023 & o) << 10) + (1023 & i) + 65536) : (t
								.push(o), n--)
						} else t.push(o)
					}
					return t
				}(e)).length,
				i = 128,
				a = 0,
				s = 72;
			for (t = 0; t < e.length; t++)(n = e[t]) < 128 && r.push(lc(n));
			var u = r.length,
				c = u;
			for (u && r.push("-"); c < o;) {
				var l = 2147483647;
				for (t = 0; t < e.length; t++)(n = e[t]) >= i && n < l && (l = n);
				var p = c + 1;
				if (l - i > cc((2147483647 - a) / p)) throw RangeError(uc);
				for (a += (l - i) * p, i = l, t = 0; t < e.length; t++) {
					if ((n = e[t]) < i && ++a > 2147483647) throw RangeError(uc);
					if (n == i) {
						for (var f = a, h = 36;; h += 36) {
							var d = h <= s ? 1 : h >= s + 26 ? 26 : h - s;
							if (f < d) break;
							var g = f - d,
								m = 36 - d;
							r.push(lc(pc(d + g % m))), f = cc(g / m)
						}
						r.push(lc(pc(f))), s = fc(a, p, c == u), a = 0, ++c
					}
				}++a, ++i
			}
			return r.join("")
		},
		dc = function(e) {
			var t = Rt(e);
			if ("function" != typeof t) throw TypeError(String(e) + " is not iterable");
			return D(t.call(e))
		},
		gc = re("fetch"),
		mc = re("Headers"),
		vc = rt("iterator"),
		yc = Z.set,
		_c = Z.getterFor("URLSearchParams"),
		Mc = Z.getterFor("URLSearchParamsIterator"),
		Ic = /\+/g,
		Cc = Array(4),
		Ec = function(e) {
			return Cc[e - 1] || (Cc[e - 1] = RegExp("((?:%[\\da-f]{2}){" + e + "})", "gi"))
		},
		Sc = function(e) {
			try {
				return decodeURIComponent(e)
			} catch (v_) {
				return e
			}
		},
		Tc = function(e) {
			var t = e.replace(Ic, " "),
				n = 4;
			try {
				return decodeURIComponent(t)
			} catch (v_) {
				for (; n;) t = t.replace(Ec(n--), Sc);
				return t
			}
		},
		Dc = /[!'()~]|%20/g,
		kc = {
			"!": "%21",
			"'": "%27",
			"(": "%28",
			")": "%29",
			"~": "%7E",
			"%20": "+"
		},
		Ac = function(e) {
			return kc[e]
		},
		Oc = function(e) {
			return encodeURIComponent(e).replace(Dc, Ac)
		},
		Rc = function(e, t) {
			if (t)
				for (var n, r, o = t.split("&"), i = 0; i < o.length;)(n = o[i++]).length && (r = n.split("="),
					e.push({
						key: Tc(r.shift()),
						value: Tc(r.join("="))
					}))
		},
		Nc = function(e) {
			this.entries.length = 0, Rc(this.entries, e)
		},
		Lc = function(e, t) {
			if (e < t) throw TypeError("Not enough arguments")
		},
		wc = tn((function(e, t) {
			yc(this, {
				type: "URLSearchParamsIterator",
				iterator: dc(_c(e).entries),
				kind: t
			})
		}), "Iterator", (function() {
			var e = Mc(this),
				t = e.kind,
				n = e.iterator.next(),
				r = n.value;
			return n.done || (n.value = "keys" === t ? r.key : "values" === t ? r.value : [r.key, r
				.value
			]), n
		})),
		bc = function() {
			pi(this, bc, "URLSearchParams");
			var e, t, n, r, o, i, a, s, u, c = arguments.length > 0 ? arguments[0] : void 0,
				l = this,
				p = [];
			if (yc(l, {
					type: "URLSearchParams",
					entries: p,
					updateURL: function() {},
					updateSearchParams: Nc
				}), void 0 !== c)
				if (m(c))
					if ("function" == typeof(e = Rt(c)))
						for (n = (t = e.call(c)).next; !(r = n.call(t)).done;) {
							if ((a = (i = (o = dc(D(r.value))).next).call(o)).done || (s = i.call(o)).done || !i
								.call(o).done) throw TypeError("Expected sequence with length 2");
							p.push({
								key: a.value + "",
								value: s.value + ""
							})
						} else
							for (u in c) _(c, u) && p.push({
								key: u,
								value: c[u] + ""
							});
					else Rc(p, "string" == typeof c ? "?" === c.charAt(0) ? c.slice(1) : c : c + "")
		},
		Pc = bc.prototype;
	ui(Pc, {
		append: function(e, t) {
			Lc(arguments.length, 2);
			var n = _c(this);
			n.entries.push({
				key: e + "",
				value: t + ""
			}), n.updateURL()
		},
		delete: function(e) {
			Lc(arguments.length, 1);
			for (var t = _c(this), n = t.entries, r = e + "", o = 0; o < n.length;) n[o].key === r ?
				n.splice(o, 1) : o++;
			t.updateURL()
		},
		get: function(e) {
			Lc(arguments.length, 1);
			for (var t = _c(this).entries, n = e + "", r = 0; r < t.length; r++)
				if (t[r].key === n) return t[r].value;
			return null
		},
		getAll: function(e) {
			Lc(arguments.length, 1);
			for (var t = _c(this).entries, n = e + "", r = [], o = 0; o < t.length; o++) t[o]
				.key === n && r.push(t[o].value);
			return r
		},
		has: function(e) {
			Lc(arguments.length, 1);
			for (var t = _c(this).entries, n = e + "", r = 0; r < t.length;)
				if (t[r++].key === n) return !0;
			return !1
		},
		set: function(e, t) {
			Lc(arguments.length, 1);
			for (var n, r = _c(this), o = r.entries, i = !1, a = e + "", s = t + "", u = 0; u < o
				.length; u++)(n = o[u]).key === a && (i ? o.splice(u--, 1) : (i = !0, n.value = s));
			i || o.push({
				key: a,
				value: s
			}), r.updateURL()
		},
		sort: function() {
			var e, t, n, r = _c(this),
				o = r.entries,
				i = o.slice();
			for (o.length = 0, n = 0; n < i.length; n++) {
				for (e = i[n], t = 0; t < n; t++)
					if (o[t].key > e.key) {
						o.splice(t, 0, e);
						break
					} t === n && o.push(e)
			}
			r.updateURL()
		},
		forEach: function(e) {
			for (var t, n = _c(this).entries, r = Be(e, arguments.length > 1 ? arguments[1] :
					void 0, 3), o = 0; o < n.length;) r((t = n[o++]).value, t.key, this)
		},
		keys: function() {
			return new wc(this, "keys")
		},
		values: function() {
			return new wc(this, "values")
		},
		entries: function() {
			return new wc(this, "entries")
		}
	}, {
		enumerable: !0
	}), ee(Pc, vc, Pc.entries), ee(Pc, "toString", (function() {
		for (var e, t = _c(this).entries, n = [], r = 0; r < t.length;) e = t[r++], n.push(Oc(e
			.key) + "=" + Oc(e.value));
		return n.join("&")
	}), {
		enumerable: !0
	}), Qt(bc, "URLSearchParams"), Re({
		global: !0,
		forced: !nc
	}, {
		URLSearchParams: bc
	}), nc || "function" != typeof gc || "function" != typeof mc || Re({
		global: !0,
		enumerable: !0,
		forced: !0
	}, {
		fetch: function(e) {
			var t, n, r, o = [e];
			return arguments.length > 1 && (m(t = arguments[1]) && (n = t.body,
				"URLSearchParams" === At(n) && ((r = t.headers ? new mc(t.headers) : new mc)
					.has("content-type") || r.set("content-type",
						"application/x-www-form-urlencoded;charset=UTF-8"), t = qe(t, {
						body: c(0, String(n)),
						headers: c(0, r)
					}))), o.push(t)), gc.apply(this, o)
		}
	});
	var Gc, Uc = {
			URLSearchParams: bc,
			getState: _c
		},
		qc = Bt.codeAt,
		xc = r.URL,
		Fc = Uc.URLSearchParams,
		Vc = Uc.getState,
		Bc = Z.set,
		jc = Z.getterFor("URL"),
		Kc = Math.floor,
		Hc = Math.pow,
		$c = /[A-Za-z]/,
		zc = /[\d+-.A-Za-z]/,
		Wc = /\d/,
		Yc = /^(0x|0X)/,
		Jc = /^[0-7]+$/,
		Xc = /^\d+$/,
		Qc = /^[\dA-Fa-f]+$/,
		Zc = /[\u0000\t\u000A\u000D #%/:?@[\\]]/,
		el = /[\u0000\t\u000A\u000D #/:?@[\\]]/,
		tl = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,
		nl = /[\t\u000A\u000D]/g,
		rl = function(e, t) {
			var n, r, o;
			if ("[" == t.charAt(0)) {
				if ("]" != t.charAt(t.length - 1)) return "Invalid host";
				if (!(n = il(t.slice(1, -1)))) return "Invalid host";
				e.host = n
			} else if (hl(e)) {
				if (t = function(e) {
						var t, n, r = [],
							o = e.toLowerCase().replace(sc, ".").split(".");
						for (t = 0; t < o.length; t++) n = o[t], r.push(ac.test(n) ? "xn--" + hc(n) : n);
						return r.join(".")
					}(t), Zc.test(t)) return "Invalid host";
				if (null === (n = ol(t))) return "Invalid host";
				e.host = n
			} else {
				if (el.test(t)) return "Invalid host";
				for (n = "", r = Nt(t), o = 0; o < r.length; o++) n += pl(r[o], sl);
				e.host = n
			}
		},
		ol = function(e) {
			var t, n, r, o, i, a, s, u = e.split(".");
			if (u.length && "" == u[u.length - 1] && u.pop(), (t = u.length) > 4) return e;
			for (n = [], r = 0; r < t; r++) {
				if ("" == (o = u[r])) return e;
				if (i = 10, o.length > 1 && "0" == o.charAt(0) && (i = Yc.test(o) ? 16 : 8, o = o.slice(8 == i ?
						1 : 2)), "" === o) a = 0;
				else {
					if (!(10 == i ? Xc : 8 == i ? Jc : Qc).test(o)) return e;
					a = parseInt(o, i)
				}
				n.push(a)
			}
			for (r = 0; r < t; r++)
				if (a = n[r], r == t - 1) {
					if (a >= Hc(256, 5 - t)) return null
				} else if (a > 255) return null;
			for (s = n.pop(), r = 0; r < n.length; r++) s += n[r] * Hc(256, 3 - r);
			return s
		},
		il = function(e) {
			var t, n, r, o, i, a, s, u = [0, 0, 0, 0, 0, 0, 0, 0],
				c = 0,
				l = null,
				p = 0,
				f = function() {
					return e.charAt(p)
				};
			if (":" == f()) {
				if (":" != e.charAt(1)) return;
				p += 2, l = ++c
			}
			for (; f();) {
				if (8 == c) return;
				if (":" != f()) {
					for (t = n = 0; n < 4 && Qc.test(f());) t = 16 * t + parseInt(f(), 16), p++, n++;
					if ("." == f()) {
						if (0 == n) return;
						if (p -= n, c > 6) return;
						for (r = 0; f();) {
							if (o = null, r > 0) {
								if (!("." == f() && r < 4)) return;
								p++
							}
							if (!Wc.test(f())) return;
							for (; Wc.test(f());) {
								if (i = parseInt(f(), 10), null === o) o = i;
								else {
									if (0 == o) return;
									o = 10 * o + i
								}
								if (o > 255) return;
								p++
							}
							u[c] = 256 * u[c] + o, 2 != ++r && 4 != r || c++
						}
						if (4 != r) return;
						break
					}
					if (":" == f()) {
						if (p++, !f()) return
					} else if (f()) return;
					u[c++] = t
				} else {
					if (null !== l) return;
					p++, l = ++c
				}
			}
			if (null !== l)
				for (a = c - l, c = 7; 0 != c && a > 0;) s = u[c], u[c--] = u[l + a - 1], u[l + --a] = s;
			else if (8 != c) return;
			return u
		},
		al = function(e) {
			var t, n, r, o;
			if ("number" == typeof e) {
				for (t = [], n = 0; n < 4; n++) t.unshift(e % 256), e = Kc(e / 256);
				return t.join(".")
			}
			if ("object" == typeof e) {
				for (t = "", r = function(e) {
						for (var t = null, n = 1, r = null, o = 0, i = 0; i < 8; i++) 0 !== e[i] ? (o > n && (
							t = r, n = o), r = null, o = 0) : (null === r && (r = i), ++o);
						return o > n && (t = r, n = o), t
					}(e), n = 0; n < 8; n++) o && 0 === e[n] || (o && (o = !1), r === n ? (t += n ? ":" : "::",
					o = !0) : (t += e[n].toString(16), n < 7 && (t += ":")));
				return "[" + t + "]"
			}
			return e
		},
		sl = {},
		ul = ic({}, sl, {
			" ": 1,
			'"': 1,
			"<": 1,
			">": 1,
			"`": 1
		}),
		cl = ic({}, ul, {
			"#": 1,
			"?": 1,
			"{": 1,
			"}": 1
		}),
		ll = ic({}, cl, {
			"/": 1,
			":": 1,
			";": 1,
			"=": 1,
			"@": 1,
			"[": 1,
			"\\": 1,
			"]": 1,
			"^": 1,
			"|": 1
		}),
		pl = function(e, t) {
			var n = qc(e, 0);
			return n > 32 && n < 127 && !_(t, e) ? e : encodeURIComponent(e)
		},
		fl = {
			ftp: 21,
			file: null,
			http: 80,
			https: 443,
			ws: 80,
			wss: 443
		},
		hl = function(e) {
			return _(fl, e.scheme)
		},
		dl = function(e) {
			return "" != e.username || "" != e.password
		},
		gl = function(e) {
			return !e.host || e.cannotBeABaseURL || "file" == e.scheme
		},
		ml = function(e, t) {
			var n;
			return 2 == e.length && $c.test(e.charAt(0)) && (":" == (n = e.charAt(1)) || !t && "|" == n)
		},
		vl = function(e) {
			var t;
			return e.length > 1 && ml(e.slice(0, 2)) && (2 == e.length || "/" === (t = e.charAt(2)) || "\\" ===
				t || "?" === t || "#" === t)
		},
		yl = function(e) {
			var t = e.path,
				n = t.length;
			!n || "file" == e.scheme && 1 == n && ml(t[0], !0) || t.pop()
		},
		_l = function(e) {
			return "." === e || "%2e" === e.toLowerCase()
		},
		Ml = {},
		Il = {},
		Cl = {},
		El = {},
		Sl = {},
		Tl = {},
		Dl = {},
		kl = {},
		Al = {},
		Ol = {},
		Rl = {},
		Nl = {},
		Ll = {},
		wl = {},
		bl = {},
		Pl = {},
		Gl = {},
		Ul = {},
		ql = {},
		xl = {},
		Fl = {},
		Vl = function(e, t, n, r) {
			var o, i, a, s, u, c = n || Ml,
				l = 0,
				p = "",
				f = !1,
				h = !1,
				d = !1;
			for (n || (e.scheme = "", e.username = "", e.password = "", e.host = null, e.port = null, e
				.path = [], e.query = null, e.fragment = null, e.cannotBeABaseURL = !1, t = t.replace(tl,
					"")), t = t.replace(nl, ""), o = Nt(t); l <= o.length;) {
				switch (i = o[l], c) {
					case Ml:
						if (!i || !$c.test(i)) {
							if (n) return "Invalid scheme";
							c = Cl;
							continue
						}
						p += i.toLowerCase(), c = Il;
						break;
					case Il:
						if (i && (zc.test(i) || "+" == i || "-" == i || "." == i)) p += i.toLowerCase();
						else {
							if (":" != i) {
								if (n) return "Invalid scheme";
								p = "", c = Cl, l = 0;
								continue
							}
							if (n && (hl(e) != _(fl, p) || "file" == p && (dl(e) || null !== e.port) ||
									"file" == e.scheme && !e.host)) return;
							if (e.scheme = p, n) return void(hl(e) && fl[e.scheme] == e.port && (e.port =
							null));
							p = "", "file" == e.scheme ? c = wl : hl(e) && r && r.scheme == e.scheme ? c = El :
								hl(e) ? c = kl : "/" == o[l + 1] ? (c = Sl, l++) : (e.cannotBeABaseURL = !0, e
									.path.push(""), c = ql)
						}
						break;
					case Cl:
						if (!r || r.cannotBeABaseURL && "#" != i) return "Invalid scheme";
						if (r.cannotBeABaseURL && "#" == i) {
							e.scheme = r.scheme, e.path = r.path.slice(), e.query = r.query, e.fragment = "", e
								.cannotBeABaseURL = !0, c = Fl;
							break
						}
						c = "file" == r.scheme ? wl : Tl;
						continue;
					case El:
						if ("/" != i || "/" != o[l + 1]) {
							c = Tl;
							continue
						}
						c = Al, l++;
						break;
					case Sl:
						if ("/" == i) {
							c = Ol;
							break
						}
						c = Ul;
						continue;
					case Tl:
						if (e.scheme = r.scheme, i == Gc) e.username = r.username, e.password = r.password, e
							.host = r.host, e.port = r.port, e.path = r.path.slice(), e.query = r.query;
						else if ("/" == i || "\\" == i && hl(e)) c = Dl;
						else if ("?" == i) e.username = r.username, e.password = r.password, e.host = r.host, e
							.port = r.port, e.path = r.path.slice(), e.query = "", c = xl;
						else {
							if ("#" != i) {
								e.username = r.username, e.password = r.password, e.host = r.host, e.port = r
									.port, e.path = r.path.slice(), e.path.pop(), c = Ul;
								continue
							}
							e.username = r.username, e.password = r.password, e.host = r.host, e.port = r.port,
								e.path = r.path.slice(), e.query = r.query, e.fragment = "", c = Fl
						}
						break;
					case Dl:
						if (!hl(e) || "/" != i && "\\" != i) {
							if ("/" != i) {
								e.username = r.username, e.password = r.password, e.host = r.host, e.port = r
									.port, c = Ul;
								continue
							}
							c = Ol
						} else c = Al;
						break;
					case kl:
						if (c = Al, "/" != i || "/" != p.charAt(l + 1)) continue;
						l++;
						break;
					case Al:
						if ("/" != i && "\\" != i) {
							c = Ol;
							continue
						}
						break;
					case Ol:
						if ("@" == i) {
							f && (p = "%40" + p), f = !0, a = Nt(p);
							for (var g = 0; g < a.length; g++) {
								var m = a[g];
								if (":" != m || d) {
									var v = pl(m, ll);
									d ? e.password += v : e.username += v
								} else d = !0
							}
							p = ""
						} else if (i == Gc || "/" == i || "?" == i || "#" == i || "\\" == i && hl(e)) {
							if (f && "" == p) return "Invalid authority";
							l -= Nt(p).length + 1, p = "", c = Rl
						} else p += i;
						break;
					case Rl:
					case Nl:
						if (n && "file" == e.scheme) {
							c = Pl;
							continue
						}
						if (":" != i || h) {
							if (i == Gc || "/" == i || "?" == i || "#" == i || "\\" == i && hl(e)) {
								if (hl(e) && "" == p) return "Invalid host";
								if (n && "" == p && (dl(e) || null !== e.port)) return;
								if (s = rl(e, p)) return s;
								if (p = "", c = Gl, n) return;
								continue
							}
							"[" == i ? h = !0 : "]" == i && (h = !1), p += i
						} else {
							if ("" == p) return "Invalid host";
							if (s = rl(e, p)) return s;
							if (p = "", c = Ll, n == Nl) return
						}
						break;
					case Ll:
						if (!Wc.test(i)) {
							if (i == Gc || "/" == i || "?" == i || "#" == i || "\\" == i && hl(e) || n) {
								if ("" != p) {
									var y = parseInt(p, 10);
									if (y > 65535) return "Invalid port";
									e.port = hl(e) && y === fl[e.scheme] ? null : y, p = ""
								}
								if (n) return;
								c = Gl;
								continue
							}
							return "Invalid port"
						}
						p += i;
						break;
					case wl:
						if (e.scheme = "file", "/" == i || "\\" == i) c = bl;
						else {
							if (!r || "file" != r.scheme) {
								c = Ul;
								continue
							}
							if (i == Gc) e.host = r.host, e.path = r.path.slice(), e.query = r.query;
							else if ("?" == i) e.host = r.host, e.path = r.path.slice(), e.query = "", c = xl;
							else {
								if ("#" != i) {
									vl(o.slice(l).join("")) || (e.host = r.host, e.path = r.path.slice(), yl(
										e)), c = Ul;
									continue
								}
								e.host = r.host, e.path = r.path.slice(), e.query = r.query, e.fragment = "",
									c = Fl
							}
						}
						break;
					case bl:
						if ("/" == i || "\\" == i) {
							c = Pl;
							break
						}
						r && "file" == r.scheme && !vl(o.slice(l).join("")) && (ml(r.path[0], !0) ? e.path.push(
							r.path[0]) : e.host = r.host), c = Ul;
						continue;
					case Pl:
						if (i == Gc || "/" == i || "\\" == i || "?" == i || "#" == i) {
							if (!n && ml(p)) c = Ul;
							else if ("" == p) {
								if (e.host = "", n) return;
								c = Gl
							} else {
								if (s = rl(e, p)) return s;
								if ("localhost" == e.host && (e.host = ""), n) return;
								p = "", c = Gl
							}
							continue
						}
						p += i;
						break;
					case Gl:
						if (hl(e)) {
							if (c = Ul, "/" != i && "\\" != i) continue
						} else if (n || "?" != i)
							if (n || "#" != i) {
								if (i != Gc && (c = Ul, "/" != i)) continue
							} else e.fragment = "", c = Fl;
						else e.query = "", c = xl;
						break;
					case Ul:
						if (i == Gc || "/" == i || "\\" == i && hl(e) || !n && ("?" == i || "#" == i)) {
							if (".." === (u = (u = p).toLowerCase()) || "%2e." === u || ".%2e" === u ||
								"%2e%2e" === u ? (yl(e), "/" == i || "\\" == i && hl(e) || e.path.push("")) :
								_l(p) ? "/" == i || "\\" == i && hl(e) || e.path.push("") : ("file" == e
									.scheme && !e.path.length && ml(p) && (e.host && (e.host = ""), p = p
										.charAt(0) + ":"), e.path.push(p)), p = "", "file" == e.scheme && (i ==
									Gc || "?" == i || "#" == i))
								for (; e.path.length > 1 && "" === e.path[0];) e.path.shift();
							"?" == i ? (e.query = "", c = xl) : "#" == i && (e.fragment = "", c = Fl)
						} else p += pl(i, cl);
						break;
					case ql:
						"?" == i ? (e.query = "", c = xl) : "#" == i ? (e.fragment = "", c = Fl) : i != Gc && (e
							.path[0] += pl(i, sl));
						break;
					case xl:
						n || "#" != i ? i != Gc && ("'" == i && hl(e) ? e.query += "%27" : e.query += "#" == i ?
							"%23" : pl(i, sl)) : (e.fragment = "", c = Fl);
						break;
					case Fl:
						i != Gc && (e.fragment += pl(i, ul))
				}
				l++
			}
		},
		Bl = function(e) {
			var t, n, r = pi(this, Bl, "URL"),
				o = arguments.length > 1 ? arguments[1] : void 0,
				a = String(e),
				s = Bc(r, {
					type: "URL"
				});
			if (void 0 !== o)
				if (o instanceof Bl) t = jc(o);
				else if (n = Vl(t = {}, String(o))) throw TypeError(n);
			if (n = Vl(s, a, null, t)) throw TypeError(n);
			var u = s.searchParams = new Fc,
				c = Vc(u);
			c.updateSearchParams(s.query), c.updateURL = function() {
				s.query = String(u) || null
			}, i || (r.href = Kl.call(r), r.origin = Hl.call(r), r.protocol = $l.call(r), r.username = zl
				.call(r), r.password = Wl.call(r), r.host = Yl.call(r), r.hostname = Jl.call(r), r.port = Xl
				.call(r), r.pathname = Ql.call(r), r.search = Zl.call(r), r.searchParams = ep.call(r), r
				.hash = tp.call(r))
		},
		jl = Bl.prototype,
		Kl = function() {
			var e = jc(this),
				t = e.scheme,
				n = e.username,
				r = e.password,
				o = e.host,
				i = e.port,
				a = e.path,
				s = e.query,
				u = e.fragment,
				c = t + ":";
			return null !== o ? (c += "//", dl(e) && (c += n + (r ? ":" + r : "") + "@"), c += al(o), null !==
					i && (c += ":" + i)) : "file" == t && (c += "//"), c += e.cannotBeABaseURL ? a[0] : a
				.length ? "/" + a.join("/") : "", null !== s && (c += "?" + s), null !== u && (c += "#" + u), c
		},
		Hl = function() {
			var e = jc(this),
				t = e.scheme,
				n = e.port;
			if ("blob" == t) try {
				return new URL(t.path[0]).origin
			} catch (v_) {
				return "null"
			}
			return "file" != t && hl(e) ? t + "://" + al(e.host) + (null !== n ? ":" + n : "") : "null"
		},
		$l = function() {
			return jc(this).scheme + ":"
		},
		zl = function() {
			return jc(this).username
		},
		Wl = function() {
			return jc(this).password
		},
		Yl = function() {
			var e = jc(this),
				t = e.host,
				n = e.port;
			return null === t ? "" : null === n ? al(t) : al(t) + ":" + n
		},
		Jl = function() {
			var e = jc(this).host;
			return null === e ? "" : al(e)
		},
		Xl = function() {
			var e = jc(this).port;
			return null === e ? "" : String(e)
		},
		Ql = function() {
			var e = jc(this),
				t = e.path;
			return e.cannotBeABaseURL ? t[0] : t.length ? "/" + t.join("/") : ""
		},
		Zl = function() {
			var e = jc(this).query;
			return e ? "?" + e : ""
		},
		ep = function() {
			return jc(this).searchParams
		},
		tp = function() {
			var e = jc(this).fragment;
			return e ? "#" + e : ""
		},
		np = function(e, t) {
			return {
				get: e,
				set: t,
				configurable: !0,
				enumerable: !0
			}
		};
	if (i && Le(jl, {
			href: np(Kl, (function(e) {
				var t = jc(this),
					n = String(e),
					r = Vl(t, n);
				if (r) throw TypeError(r);
				Vc(t.searchParams).updateSearchParams(t.query)
			})),
			origin: np(Hl),
			protocol: np($l, (function(e) {
				var t = jc(this);
				Vl(t, String(e) + ":", Ml)
			})),
			username: np(zl, (function(e) {
				var t = jc(this),
					n = Nt(String(e));
				if (!gl(t)) {
					t.username = "";
					for (var r = 0; r < n.length; r++) t.username += pl(n[r], ll)
				}
			})),
			password: np(Wl, (function(e) {
				var t = jc(this),
					n = Nt(String(e));
				if (!gl(t)) {
					t.password = "";
					for (var r = 0; r < n.length; r++) t.password += pl(n[r], ll)
				}
			})),
			host: np(Yl, (function(e) {
				var t = jc(this);
				t.cannotBeABaseURL || Vl(t, String(e), Rl)
			})),
			hostname: np(Jl, (function(e) {
				var t = jc(this);
				t.cannotBeABaseURL || Vl(t, String(e), Nl)
			})),
			port: np(Xl, (function(e) {
				var t = jc(this);
				gl(t) || ("" == (e = String(e)) ? t.port = null : Vl(t, e, Ll))
			})),
			pathname: np(Ql, (function(e) {
				var t = jc(this);
				t.cannotBeABaseURL || (t.path = [], Vl(t, e + "", Gl))
			})),
			search: np(Zl, (function(e) {
				var t = jc(this);
				"" == (e = String(e)) ? t.query = null: ("?" == e.charAt(0) && (e = e.slice(1)),
					t.query = "", Vl(t, e, xl)), Vc(t.searchParams).updateSearchParams(t
					.query)
			})),
			searchParams: np(ep),
			hash: np(tp, (function(e) {
				var t = jc(this);
				"" != (e = String(e)) ? ("#" == e.charAt(0) && (e = e.slice(1)), t.fragment =
					"", Vl(t, e, Fl)) : t.fragment = null
			}))
		}), ee(jl, "toJSON", (function() {
			return Kl.call(this)
		}), {
			enumerable: !0
		}), ee(jl, "toString", (function() {
			return Kl.call(this)
		}), {
			enumerable: !0
		}), xc) {
		var rp = xc.createObjectURL,
			op = xc.revokeObjectURL;
		rp && ee(Bl, "createObjectURL", (function(e) {
			return rp.apply(xc, arguments)
		})), op && ee(Bl, "revokeObjectURL", (function(e) {
			return op.apply(xc, arguments)
		}))
	}
	Qt(Bl, "URL"), Re({
		global: !0,
		forced: !nc,
		sham: !i
	}, {
		URL: Bl
	}), Re({
		target: "Object",
		stat: !0,
		forced: Object.assign !== ic
	}, {
		assign: ic
	});
	var ip = {
			JSON: {
				TYPE: {
					C2C: {
						NOTICE: 1,
						COMMON: 9,
						EVENT: 10
					},
					GROUP: {
						COMMON: 3,
						TIP: 4,
						SYSTEM: 5,
						TIP2: 6
					},
					FRIEND: {
						NOTICE: 7
					},
					PROFILE: {
						NOTICE: 8
					}
				},
				SUBTYPE: {
					C2C: {
						COMMON: 0,
						READED: 92,
						KICKEDOUT: 96
					},
					GROUP: {
						COMMON: 0,
						LOVEMESSAGE: 1,
						TIP: 2,
						REDPACKET: 3
					}
				},
				OPTIONS: {
					GROUP: {
						JOIN: 1,
						QUIT: 2,
						KICK: 3,
						SET_ADMIN: 4,
						CANCEL_ADMIN: 5,
						MODIFY_GROUP_INFO: 6,
						MODIFY_MEMBER_INFO: 7
					}
				}
			},
			PROTOBUF: {},
			IMAGE_TYPES: {
				ORIGIN: 1,
				LARGE: 2,
				SMALL: 3
			},
			IMAGE_FORMAT: {
				JPG: 1,
				JPEG: 1,
				GIF: 2,
				PNG: 3,
				BMP: 4,
				UNKNOWN: 255
			}
		},
		ap = 1,
		sp = 2,
		up = 3,
		cp = 4,
		lp = 5,
		pp = 7,
		fp = 8,
		hp = 9,
		dp = 10,
		gp = 15,
		mp = 255,
		vp = 2,
		yp = 0,
		_p = 1,
		Mp = {
			NICK: "Tag_Profile_IM_Nick",
			GENDER: "Tag_Profile_IM_Gender",
			BIRTHDAY: "Tag_Profile_IM_BirthDay",
			LOCATION: "Tag_Profile_IM_Location",
			SELFSIGNATURE: "Tag_Profile_IM_SelfSignature",
			ALLOWTYPE: "Tag_Profile_IM_AllowType",
			LANGUAGE: "Tag_Profile_IM_Language",
			AVATAR: "Tag_Profile_IM_Image",
			MESSAGESETTINGS: "Tag_Profile_IM_MsgSettings",
			ADMINFORBIDTYPE: "Tag_Profile_IM_AdminForbidType",
			LEVEL: "Tag_Profile_IM_Level",
			ROLE: "Tag_Profile_IM_Role"
		},
		Ip = {
			UNKNOWN: "Gender_Type_Unknown",
			FEMALE: "Gender_Type_Female",
			MALE: "Gender_Type_Male"
		},
		Cp = {
			NONE: "AdminForbid_Type_None",
			SEND_OUT: "AdminForbid_Type_SendOut"
		},
		Ep = {
			NEED_CONFIRM: "AllowType_Type_NeedConfirm",
			ALLOW_ANY: "AllowType_Type_AllowAny",
			DENY_ANY: "AllowType_Type_DenyAny"
		},
		Sp = function() {
			function e(t) {
				In(this, e), this._imageMemoryURL = "", this._file = t.file, Fa ? this
					.createImageDataASURLInWXMiniApp(t.file) : this.createImageDataASURLInWeb(t.file), this
					._initImageInfoModel(), this.type = _n.MSG_IMAGE, this._percent = 0, this.content = {
						imageFormat: t.imageFormat || ip.IMAGE_FORMAT.UNKNOWN,
						uuid: t.uuid,
						imageInfoArray: []
					}, this.initImageInfoArray(t.imageInfoArray), this._defaultImage =
					"http://imgcache.qq.com/open/qcloud/video/act/webim-images/default.jpg", this._autoFixUrl()
			}
			return En(e, [{
				key: "_initImageInfoModel",
				value: function() {
					var e = this;
					this._ImageInfoModel = function(t) {
						this.instanceID = xs(9999999), this.sizeType = t.type || 0, this
							.type = 0, this.size = t.size || 0, this.width = t.width || 0,
							this.height = t.height || 0, this.imageUrl = t.url || "", this
							.url = t.url || e._imageMemoryURL || e._defaultImage
					}, this._ImageInfoModel.prototype = {
						setSizeType: function(e) {
							this.sizeType = e
						},
						setType: function(e) {
							this.type = e
						},
						setImageUrl: function(e) {
							e && (this.imageUrl = e)
						},
						getImageUrl: function() {
							return this.imageUrl
						}
					}
				}
			}, {
				key: "initImageInfoArray",
				value: function(e) {
					for (var t = 0, n = null, r = null; t <= 2;) r = ks(e) || ks(e[t]) ? {
							type: 0,
							size: 0,
							width: 0,
							height: 0,
							url: ""
						} : e[t], (n = new this._ImageInfoModel(r)).setSizeType(t + 1), n
						.setType(t), this.addImageInfo(n), t++;
					this.updateAccessSideImageInfoArray()
				}
			}, {
				key: "updateImageInfoArray",
				value: function(e) {
					for (var t, n = this.content.imageInfoArray.length, r = 0; r < n; r++) t =
						this.content.imageInfoArray[r], e[r].size && (t.size = e[r].size), e[r]
						.url && t.setImageUrl(e[r].url), e[r].width && (t.width = e[r].width),
						e[r].height && (t.height = e[r].height)
				}
			}, {
				key: "_autoFixUrl",
				value: function() {
					for (var e = this.content.imageInfoArray.length, t = "", n = "", r = [
							"http", "https"
						], o = null, i = 0; i < e; i++) this.content.imageInfoArray[i].url &&
						"" !== (o = this.content.imageInfoArray[i]).imageUrl && (n = o.imageUrl
							.slice(0, o.imageUrl.indexOf("://") + 1), t = o.imageUrl.slice(o
								.imageUrl.indexOf("://") + 1), r.indexOf(n) < 0 && (n =
								"https:"), this.content.imageInfoArray[i].setImageUrl([n, t]
								.join("")))
				}
			}, {
				key: "updatePercent",
				value: function(e) {
					this._percent = e, this._percent > 1 && (this._percent = 1)
				}
			}, {
				key: "updateImageFormat",
				value: function(e) {
					this.content.imageFormat = ip.IMAGE_FORMAT[e.toUpperCase()] || ip
						.IMAGE_FORMAT.UNKNOWN
				}
			}, {
				key: "createImageDataASURLInWeb",
				value: function(e) {
					void 0 !== e && e.files.length > 0 && (this._imageMemoryURL = window.URL
						.createObjectURL(e.files[0]))
				}
			}, {
				key: "createImageDataASURLInWXMiniApp",
				value: function(e) {
					e && e.url && (this._imageMemoryURL = e.url)
				}
			}, {
				key: "replaceImageInfo",
				value: function(e, t) {
					this.content.imageInfoArray[t] instanceof this._ImageInfoModel || (this
						.content.imageInfoArray[t] = e)
				}
			}, {
				key: "addImageInfo",
				value: function(e) {
					this.content.imageInfoArray.length >= 3 || this.content.imageInfoArray.push(
						e)
				}
			}, {
				key: "updateAccessSideImageInfoArray",
				value: function() {
					var e = this.content.imageInfoArray,
						t = e[0],
						n = t.width,
						r = void 0 === n ? 0 : n,
						o = t.height,
						i = void 0 === o ? 0 : o;
					0 !== r && 0 !== i && (nu(e), Object.assign(e[2], tu({
						originWidth: r,
						originHeight: i,
						min: 720
					})))
				}
			}, {
				key: "sendable",
				value: function() {
					return 0 !== this.content.imageInfoArray.length && ("" !== this.content
						.imageInfoArray[0].imageUrl && 0 !== this.content.imageInfoArray[0]
						.size)
				}
			}]), e
		}(),
		Tp = function() {
			function e(t) {
				In(this, e), this.type = _n.MSG_FACE, this.content = t || null
			}
			return En(e, [{
				key: "sendable",
				value: function() {
					return null !== this.content
				}
			}]), e
		}(),
		Dp = function() {
			function e(t) {
				In(this, e), this.type = _n.MSG_AUDIO, this._percent = 0, this.content = {
					downloadFlag: 2,
					second: t.second,
					size: t.size,
					url: t.url,
					remoteAudioUrl: t.url || "",
					uuid: t.uuid
				}
			}
			return En(e, [{
				key: "updatePercent",
				value: function(e) {
					this._percent = e, this._percent > 1 && (this._percent = 1)
				}
			}, {
				key: "updateAudioUrl",
				value: function(e) {
					this.content.remoteAudioUrl = e
				}
			}, {
				key: "sendable",
				value: function() {
					return "" !== this.content.remoteAudioUrl
				}
			}]), e
		}();
	Re({
		target: "Object",
		stat: !0,
		forced: !i,
		sham: !i
	}, {
		defineProperty: A.f
	});
	var kp = {
			from: !0,
			groupID: !0,
			groupName: !0,
			to: !0
		},
		Ap = function() {
			function e(t) {
				In(this, e), this.type = _n.MSG_GRP_TIP, this.content = {}, this._initContent(t)
			}
			return En(e, [{
				key: "_initContent",
				value: function(e) {
					var t = this;
					Object.keys(e).forEach((function(n) {
						switch (n) {
							case "remarkInfo":
								break;
							case "groupProfile":
								t.content.groupProfile = {}, t._initGroupProfile(e[
									n]);
								break;
							case "operatorInfo":
							case "memberInfoList":
								break;
							case "msgMemberInfo":
								t.content.memberList = e[n], Object.defineProperty(t
									.content, "msgMemberInfo", {
										get: function() {
											return Ms.warn(
													"!!! 禁言的群提示消息中的 payload.msgMemberInfo 属性即将废弃，请使用 payload.memberList 属性替代。 \n",
													"msgMemberInfo 中的 shutupTime 属性对应更改为 memberList 中的 muteTime 属性，表示禁言时长。 \n",
													"参考：群提示消息 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/Message.html#.GroupTipPayload"
													), t.content.memberList
												.map((function(e) {
													return {
														userID: e
															.userID,
														shutupTime: e
															.muteTime
													}
												}))
										}
									});
								break;
							case "onlineMemberInfo":
								break;
							case "memberNum":
								t.content[n] = e[n], t.content.memberCount = e[n];
								break;
							default:
								t.content[n] = e[n]
						}
					})), this.content.userIDList || (this.content.userIDList = [this.content
						.operatorID
					])
				}
			}, {
				key: "_initGroupProfile",
				value: function(e) {
					for (var t = Object.keys(e), n = 0; n < t.length; n++) {
						var r = t[n];
						kp[r] && (this.content.groupProfile[r] = e[r])
					}
				}
			}]), e
		}(),
		Op = {
			from: !0,
			groupID: !0,
			name: !0,
			to: !0
		},
		Rp = function() {
			function e(t) {
				In(this, e), this.type = _n.MSG_GRP_SYS_NOTICE, this.content = {}, this._initContent(t)
			}
			return En(e, [{
				key: "_initContent",
				value: function(e) {
					var t = this;
					Object.keys(e).forEach((function(n) {
						switch (n) {
							case "memberInfoList":
								break;
							case "remarkInfo":
								t.content.handleMessage = e[n];
								break;
							case "groupProfile":
								t.content.groupProfile = {}, t._initGroupProfile(e[
									n]);
								break;
							default:
								t.content[n] = e[n]
						}
					}))
				}
			}, {
				key: "_initGroupProfile",
				value: function(e) {
					for (var t = Object.keys(e), n = 0; n < t.length; n++) {
						var r = t[n];
						Op[r] && (this.content.groupProfile[r] = e[r])
					}
				}
			}]), e
		}(),
		Np = Math.min,
		Lp = [].lastIndexOf,
		wp = !!Lp && 1 / [1].lastIndexOf(1, -0) < 0,
		bp = ct("lastIndexOf"),
		Pp = wp || !bp ? function(e) {
			if (wp) return Lp.apply(this, arguments) || 0;
			var t = g(this),
				n = ue(t.length),
				r = n - 1;
			for (arguments.length > 1 && (r = Np(r, ae(arguments[1]))), r < 0 && (r = n + r); r >= 0; r--)
				if (r in t && t[r] === e) return r || 0;
			return -1
		} : Lp;
	Re({
		target: "Array",
		proto: !0,
		forced: Pp !== [].lastIndexOf
	}, {
		lastIndexOf: Pp
	});
	var Gp, Up = "https://cloud.tencent.com/document/product/",
		qp = "您可以在即时通信 IM 控制台的【开发辅助工具(https://console.cloud.tencent.com/im-detail/tool-usersig)】页面校验 UserSig。",
		xp = "UserSig 非法，请使用官网提供的 API 重新生成 UserSig(".concat(Up, "269/32688)。"),
		Fp = {
			70001: "UserSig 已过期，请重新生成。建议 UserSig 有效期设置不小于24小时。",
			70002: "UserSig 长度为0，请检查传入的 UserSig 是否正确。",
			70003: xp,
			70005: xp,
			70009: "UserSig 验证失败，可能因为生成 UserSig 时混用了其他 SDKAppID 的私钥或密钥导致，请使用对应 SDKAppID 下的私钥或密钥重新生成 UserSig("
				.concat(Up, "269/32688)。"),
			70013: "请求中的 UserID 与生成 UserSig 时使用的 UserID 不匹配。".concat(qp),
			70014: "请求中的 SDKAppID 与生成 UserSig 时使用的 SDKAppID 不匹配。".concat(qp),
			70016: "密钥不存在，UserSig 验证失败，请在即时通信 IM 控制台获取密钥(".concat(Up,
				"269/32578#.E8.8E.B7.E5.8F.96.E5.AF.86.E9.92.A5)。"),
			70020: "SDKAppID 未找到，请在即时通信 IM 控制台确认应用信息。",
			70050: "UserSig 验证次数过于频繁。请检查 UserSig 是否正确，并于1分钟后重新验证。".concat(qp),
			70051: "帐号被拉入黑名单。",
			70052: "UserSig 已经失效，请重新生成，再次尝试。",
			70107: "因安全原因被限制登录，请不要频繁登录。",
			70169: "请求的用户帐号不存在。",
			70114: "".concat("服务端内部超时，请稍后重试。"),
			70202: "".concat("服务端内部超时，请稍后重试。"),
			70206: "请求中批量数量不合法。",
			70402: "参数非法，请检查必填字段是否填充，或者字段的填充是否满足协议要求。",
			70403: "请求失败，需要 App 管理员权限。",
			70398: "帐号数超限。如需创建多于100个帐号，请将应用升级为专业版，具体操作指引请参见购买指引(".concat(Up, "269/32458)。"),
			70500: "".concat("服务端内部错误，请重试。"),
			71e3: "删除帐号失败。仅支持删除体验版帐号，您当前应用为专业版，暂不支持帐号删除。",
			20001: "请求包非法。",
			20002: "UserSig 或 A2 失效。",
			20003: "消息发送方或接收方 UserID 无效或不存在，请检查 UserID 是否已导入即时通信 IM。",
			20004: "网络异常，请重试。",
			20005: "".concat("服务端内部错误，请重试。"),
			20006: "触发发送".concat("单聊消息", "之前回调，App 后台返回禁止下发该消息。"),
			20007: "发送".concat("单聊消息", "，被对方拉黑，禁止发送。消息发送状态默认展示为失败，您可以登录控制台修改该场景下的消息发送状态展示结果，具体操作请参见消息保留设置(")
				.concat(Up, "269/38656)。"),
			20009: "消息发送双方互相不是好友，禁止发送（配置".concat("单聊消息", "校验好友关系才会出现）。"),
			20010: "发送".concat("单聊消息", "，自己不是对方的好友（单向关系），禁止发送。"),
			20011: "发送".concat("单聊消息", "，对方不是自己的好友（单向关系），禁止发送。"),
			20012: "发送方被禁言，该条消息被禁止发送。",
			20016: "消息撤回超过了时间限制（默认2分钟）。",
			20018: "删除漫游内部错误。",
			90001: "JSON 格式解析失败，请检查请求包是否符合 JSON 规范。",
			90002: "".concat("JSON 格式请求包体",
				"中 MsgBody 不符合消息格式描述，或者 MsgBody 不是 Array 类型，请参考 TIMMsgElement 对象的定义(").concat(Up,
				"269/2720#.E6.B6.88.E6.81.AF.E5.85.83.E7.B4.A0-timmsgelement)。"),
			90003: "".concat("JSON 格式请求包体", "中缺少 To_Account 字段或者 To_Account 帐号不存在。"),
			90005: "".concat("JSON 格式请求包体", "中缺少 MsgRandom 字段或者 MsgRandom 字段不是 Integer 类型。"),
			90006: "".concat("JSON 格式请求包体", "中缺少 MsgTimeStamp 字段或者 MsgTimeStamp 字段不是 Integer 类型。"),
			90007: "".concat("JSON 格式请求包体", "中 MsgBody 类型不是 Array 类型，请将其修改为 Array 类型。"),
			90008: "".concat("JSON 格式请求包体", "中缺少 From_Account 字段或者 From_Account 帐号不存在。"),
			90009: "请求需要 App 管理员权限。",
			90010: "".concat("JSON 格式请求包体", "不符合消息格式描述，请参考 TIMMsgElement 对象的定义(").concat(Up,
				"269/2720#.E6.B6.88.E6.81.AF.E5.85.83.E7.B4.A0-timmsgelement)。"),
			90011: "批量发消息目标帐号超过500，请减少 To_Account 中目标帐号数量。",
			90012: "To_Account 没有注册或不存在，请确认 To_Account 是否导入即时通信 IM 或者是否拼写错误。",
			90026: "消息离线存储时间错误（最多不能超过7天）。",
			90031: "".concat("JSON 格式请求包体", "中 SyncOtherMachine 字段不是 Integer 类型。"),
			90044: "".concat("JSON 格式请求包体", "中 MsgLifeTime 字段不是 Integer 类型。"),
			90048: "请求的用户帐号不存在。",
			90054: "撤回请求中的 MsgKey 不合法。",
			90994: "".concat("服务端内部错误，请重试。"),
			90995: "".concat("服务端内部错误，请重试。"),
			91e3: "".concat("服务端内部错误，请重试。"),
			90992: "".concat("服务端内部错误，请重试。",
				"如果所有请求都返回该错误码，且 App 配置了第三方回调，请检查 App 服务端是否正常向即时通信 IM 后台服务端返回回调结果。"),
			93e3: "JSON 数据包超长，消息包体请不要超过8k。",
			91101: "Web 端长轮询被踢（Web 端同时在线实例个数超出限制）。",
			10002: "".concat("服务端内部错误，请重试。"),
			10003: "请求中的接口名称错误，请核对接口名称并重试。",
			10004: "参数非法，请根据错误描述检查请求是否正确。",
			10005: "请求包体中携带的帐号数量过多。",
			10006: "操作频率限制，请尝试降低调用的频率。",
			10007: "操作权限不足，例如 Work ".concat("群组", "中普通成员尝试执行踢人操作，但只有 App 管理员才有权限。"),
			10008: "请求非法，可能是请求中携带的签名信息验证不正确，请再次尝试。",
			10009: "该群不允许群主主动退出。",
			10010: "".concat("群组", "不存在，或者曾经存在过，但是目前已经被解散。"),
			10011: "解析 JSON 包体失败，请检查包体的格式是否符合 JSON 格式。",
			10012: "发起操作的 UserID 非法，请检查发起操作的用户 UserID 是否填写正确。",
			10013: "被邀请加入的用户已经是群成员。",
			10014: "群已满员，无法将请求中的用户加入".concat("群组", "，如果是批量加人，可以尝试减少加入用户的数量。"),
			10015: "找不到指定 ID 的".concat("群组", "。"),
			10016: "App 后台通过第三方回调拒绝本次操作。",
			10017: "因被禁言而不能发送消息，请检查发送者是否被设置禁言。",
			10018: "应答包长度超过最大包长（1MB），请求的内容过多，请尝试减少单次请求的数据量。",
			10019: "请求的用户帐号不存在。",
			10021: "".concat("群组", " ID 已被使用，请选择其他的").concat("群组", " ID。"),
			10023: "发消息的频率超限，请延长两次发消息时间的间隔。",
			10024: "此邀请或者申请请求已经被处理。",
			10025: "".concat("群组", " ID 已被使用，并且操作者为群主，可以直接使用。"),
			10026: "该 SDKAppID 请求的命令字已被禁用。",
			10030: "请求撤回的消息不存在。",
			10031: "消息撤回超过了时间限制（默认2分钟）。",
			10032: "请求撤回的消息不支持撤回操作。",
			10033: "".concat("群组", "类型不支持消息撤回操作。"),
			10034: "该消息类型不支持删除操作。",
			10035: "直播群和在线成员广播大群不支持删除消息。",
			10036: "直播群创建数量超过了限制，请参考价格说明(".concat(Up, "269/11673)购买预付费套餐“IM直播群”。"),
			10037: "单个用户可创建和加入的".concat("群组", "数量超过了限制，请参考价格说明(").concat(Up, "269/11673)购买或升级预付费套餐“单人可创建与加入")
				.concat("群组", "数”。"),
			10038: "群成员数量超过限制，请参考价格说明(".concat(Up, "269/11673)购买或升级预付费套餐“扩展群人数上限”。"),
			10041: "该应用（SDKAppID）已配置不支持群消息撤回。"
		},
		Vp = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this)).code = e.code, r.message = Fp[e.code] || e.message, r
					.data = e.data || {}, r
			}
			return n
		}(Ln(Error)),
		Bp = {
			NO_SDKAPPID: 2e3,
			NO_ACCOUNT_TYPE: 2001,
			NO_IDENTIFIER: 2002,
			NO_USERSIG: 2003,
			NO_TINYID: 2022,
			NO_A2KEY: 2023,
			USER_NOT_LOGGED_IN: 2024,
			COS_UNDETECTED: 2040,
			COS_GET_SIG_FAIL: 2041,
			MESSAGE_SEND_FAIL: 2100,
			MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS: 2103,
			MESSAGE_SEND_NEED_MESSAGE_INSTANCE: 2105,
			MESSAGE_SEND_INVALID_CONVERSATION_TYPE: 2106,
			MESSAGE_FILE_IS_EMPTY: 2108,
			MESSAGE_ONPROGRESS_FUNCTION_ERROR: 2109,
			MESSAGE_REVOKE_FAIL: 2110,
			MESSAGE_IMAGE_SELECT_FILE_FIRST: 2251,
			MESSAGE_IMAGE_TYPES_LIMIT: 2252,
			MESSAGE_IMAGE_SIZE_LIMIT: 2253,
			MESSAGE_AUDIO_UPLOAD_FAIL: 2300,
			MESSAGE_AUDIO_SIZE_LIMIT: 2301,
			MESSAGE_VIDEO_UPLOAD_FAIL: 2350,
			MESSAGE_VIDEO_SIZE_LIMIT: 2351,
			MESSAGE_VIDEO_TYPES_LIMIT: 2352,
			MESSAGE_FILE_UPLOAD_FAIL: 2400,
			MESSAGE_FILE_SELECT_FILE_FIRST: 2401,
			MESSAGE_FILE_SIZE_LIMIT: 2402,
			MESSAGE_FILE_URL_IS_EMPTY: 2403,
			MESSAGE_MERGER_TYPE_INVALID: 2450,
			MESSAGE_MERGER_KEY_INVALID: 2451,
			MESSAGE_MERGER_DOWNLOAD_FAIL: 2452,
			MESSAGE_FORWARD_TYPE_INVALID: 2453,
			CONVERSATION_NOT_FOUND: 2500,
			USER_OR_GROUP_NOT_FOUND: 2501,
			CONVERSATION_UN_RECORDED_TYPE: 2502,
			ILLEGAL_GROUP_TYPE: 2600,
			CANNOT_JOIN_WORK: 2601,
			CANNOT_CHANGE_OWNER_IN_AVCHATROOM: 2620,
			CANNOT_CHANGE_OWNER_TO_SELF: 2621,
			CANNOT_DISMISS_Work: 2622,
			MEMBER_NOT_IN_GROUP: 2623,
			JOIN_GROUP_FAIL: 2660,
			CANNOT_ADD_MEMBER_IN_AVCHATROOM: 2661,
			CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN: 2662,
			CANNOT_KICK_MEMBER_IN_AVCHATROOM: 2680,
			NOT_OWNER: 2681,
			CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM: 2682,
			INVALID_MEMBER_ROLE: 2683,
			CANNOT_SET_SELF_MEMBER_ROLE: 2684,
			CANNOT_MUTE_SELF: 2685,
			DEL_FRIEND_INVALID_PARAM: 2700,
			UPDATE_PROFILE_INVALID_PARAM: 2721,
			UPDATE_PROFILE_NO_KEY: 2722,
			ADD_BLACKLIST_INVALID_PARAM: 2740,
			DEL_BLACKLIST_INVALID_PARAM: 2741,
			CANNOT_ADD_SELF_TO_BLACKLIST: 2742,
			NETWORK_ERROR: 2800,
			NETWORK_TIMEOUT: 2801,
			NETWORK_BASE_OPTIONS_NO_URL: 2802,
			NETWORK_UNDEFINED_SERVER_NAME: 2803,
			NETWORK_PACKAGE_UNDEFINED: 2804,
			NO_NETWORK: 2805,
			CONVERTOR_IRREGULAR_PARAMS: 2900,
			NOTICE_RUNLOOP_UNEXPECTED_CONDITION: 2901,
			NOTICE_RUNLOOP_OFFSET_LOST: 2902,
			UNCAUGHT_ERROR: 2903,
			GET_LONGPOLL_ID_FAILED: 2904,
			INVALID_OPERATION: 2905,
			SDK_IS_NOT_READY: 2999,
			LONG_POLL_KICK_OUT: 91101,
			MESSAGE_A2KEY_EXPIRED: 20002,
			ACCOUNT_A2KEY_EXPIRED: 70001,
			LONG_POLL_API_PARAM_ERROR: 90001
		},
		jp = "无 SDKAppID",
		Kp = "无 accountType",
		Hp = "无 userID",
		$p = "无 userSig",
		zp = "无 tinyID",
		Wp = "无 a2key",
		Yp = "用户未登录",
		Jp = "未检测到 COS 上传插件",
		Xp = "获取 COS 预签名 URL 失败",
		Qp = "消息发送失败",
		Zp = "MessageController.constructor() 需要参数 options",
		ef = "需要 Message 的实例",
		tf = 'Message.conversationType 只能为 "C2C" 或 "GROUP"',
		nf = "无法发送空文件",
		rf = "回调函数运行时遇到错误，请检查接入侧代码",
		of = "消息撤回失败",
		af = "请先选择一个图片",
		sf = "只允许上传 jpg png jpeg gif bmp格式的图片",
		uf = "图片大小超过20M，无法发送",
		cf = "语音上传失败",
		lf = "语音大小大于20M，无法发送",
		pf = "视频上传失败",
		ff = "视频大小超过100M，无法发送",
		hf = "只允许上传 mp4 格式的视频",
		df = "文件上传失败",
		gf = "请先选择一个文件",
		mf = "文件大小超过100M，无法发送 ",
		vf = "缺少必要的参数文件 URL",
		yf = "非合并消息",
		_f = "合并消息的 messageKey 无效",
		Mf = "下载合并消息失败",
		If = "选择的消息类型（如群提示消息）不可以转发",
		Cf = "没有找到相应的会话，请检查传入参数",
		Ef = "没有找到相应的用户或群组，请检查传入参数",
		Sf = "未记录的会话类型",
		Tf = "非法的群类型，请检查传入参数",
		Df = "不能加入 Work 类型的群组",
		kf = "AVChatRoom 类型的群组不能转让群主",
		Af = "不能把群主转让给自己",
		Of = "不能解散 Work 类型的群组",
		Rf = "用户不在该群组内",
		Nf = "加群失败，请检查传入参数或重试",
		Lf = "AVChatRoom 类型的群不支持邀请群成员",
		wf = "非 AVChatRoom 类型的群组不允许匿名加群，请先登录后再加群",
		bf = "不能在 AVChatRoom 类型的群组踢人",
		Pf = "你不是群主，只有群主才有权限操作",
		Gf = "不能在 Work / AVChatRoom 类型的群中设置群成员身份",
		Uf = "不合法的群成员身份，请检查传入参数",
		qf = "不能设置自己的群成员身份，请检查传入参数",
		xf = "不能将自己禁言，请检查传入参数",
		Ff = "传入 deleteFriend 接口的参数无效",
		Vf = "传入 updateMyProfile 接口的参数无效",
		Bf = "updateMyProfile 无标配资料字段或自定义资料字段",
		jf = "传入 addToBlacklist 接口的参数无效",
		Kf = "传入 removeFromBlacklist 接口的参数无效",
		Hf = "不能拉黑自己",
		$f = "网络层初始化错误，缺少 URL 参数",
		zf = "打包错误，未定义的 serverName",
		Wf = "未定义的 packageConfig",
		Yf = "未连接到网络",
		Jf = "不规范的参数名称",
		Xf = "_syncOffset 丢失",
		Qf = "获取 longpolling id 失败",
		Zf = "无效操作，如调用了未定义或者未实现的方法等",
		eh = "接口需要 SDK 处于 ready 状态后才能调用",
		th = ["jpg", "jpeg", "gif", "png", "bmp"],
		nh = ["mp4"],
		rh = 1,
		oh = 2,
		ih = 3,
		ah = 255,
		sh = function() {
			function e(t) {
				In(this, e);
				var n = this._check(t);
				if (n instanceof Vp) throw n;
				this.type = _n.MSG_FILE, this._percent = 0;
				var r = this._getFileInfo(t);
				this.content = {
					downloadFlag: 2,
					fileUrl: t.url || "",
					uuid: t.uuid,
					fileName: r.name || "",
					fileSize: r.size || 0
				}
			}
			return En(e, [{
				key: "_getFileInfo",
				value: function(e) {
					if (e.fileName && e.fileSize) return {
						size: e.fileSize,
						name: e.fileName
					};
					if (Fa) return {};
					var t = e.file.files[0];
					return {
						size: t.size,
						name: t.name,
						type: t.type.slice(t.type.lastIndexOf("/") + 1).toLowerCase()
					}
				}
			}, {
				key: "updatePercent",
				value: function(e) {
					this._percent = e, this._percent > 1 && (this._percent = 1)
				}
			}, {
				key: "updateFileUrl",
				value: function(e) {
					this.content.fileUrl = e
				}
			}, {
				key: "_check",
				value: function(e) {
					if (e.size > 104857600) return new Vp({
						code: Bp.MESSAGE_FILE_SIZE_LIMIT,
						message: "".concat(mf, ": ").concat(104857600, " bytes")
					})
				}
			}, {
				key: "sendable",
				value: function() {
					return "" !== this.content.fileUrl && ("" !== this.content.fileName && 0 !==
						this.content.fileSize)
				}
			}]), e
		}(),
		uh = function() {
			function e(t) {
				In(this, e), this.type = _n.MSG_CUSTOM, this.content = {
					data: t.data || "",
					description: t.description || "",
					extension: t.extension || ""
				}
			}
			return En(e, [{
				key: "setData",
				value: function(e) {
					return this.content.data = e, this
				}
			}, {
				key: "setDescription",
				value: function(e) {
					return this.content.description = e, this
				}
			}, {
				key: "setExtension",
				value: function(e) {
					return this.content.extension = e, this
				}
			}, {
				key: "sendable",
				value: function() {
					return 0 !== this.content.data.length || 0 !== this.content.description
						.length || 0 !== this.content.extension.length
				}
			}]), e
		}(),
		ch = function() {
			function e(t) {
				In(this, e), this.type = _n.MSG_VIDEO, this._percent = 0, this.content = {
					remoteVideoUrl: t.remoteVideoUrl || t.videoUrl || "",
					videoFormat: t.videoFormat,
					videoSecond: parseInt(t.videoSecond, 10),
					videoSize: t.videoSize,
					videoUrl: t.videoUrl,
					videoDownloadFlag: 2,
					videoUUID: t.videoUUID,
					thumbUUID: t.thumbUUID,
					thumbFormat: t.thumbFormat,
					thumbWidth: t.thumbWidth,
					thumbHeight: t.thumbHeight,
					thumbSize: t.thumbSize,
					thumbDownloadFlag: 2,
					thumbUrl: t.thumbUrl
				}
			}
			return En(e, [{
				key: "updatePercent",
				value: function(e) {
					this._percent = e, this._percent > 1 && (this._percent = 1)
				}
			}, {
				key: "updateVideoUrl",
				value: function(e) {
					e && (this.content.remoteVideoUrl = e)
				}
			}, {
				key: "sendable",
				value: function() {
					return "" !== this.content.remoteVideoUrl
				}
			}]), e
		}(),
		lh = function e(t) {
			In(this, e), this.type = _n.MSG_GEO, this.content = t
		},
		ph = T.f,
		fh = "".startsWith,
		hh = Math.min,
		dh = so("startsWith"),
		gh = !(dh || (Gp = ph(String.prototype, "startsWith"), !Gp || Gp.writable));
	Re({
		target: "String",
		proto: !0,
		forced: !gh && !dh
	}, {
		startsWith: function(e) {
			var t = String(d(this));
			io(e);
			var n = ue(hh(arguments.length > 1 ? arguments[1] : void 0, t.length)),
				r = String(e);
			return fh ? fh.call(t, r, n) : t.slice(n, n + r.length) === r
		}
	});
	var mh = function() {
			function e(t) {
				if (In(this, e), this.from = t.from, this.messageSender = t.from, this.time = t.time, this
					.messageSequence = t.sequence, this.clientSequence = t.clientSequence || t.sequence, this
					.messageRandom = t.random, t.ID) this.nick = t.nick || "", this.avatar = t.avatar || "",
					this.messageBody = [{
						type: t.type,
						payload: t.payload
					}], t.conversationType.startsWith(_n.CONV_C2C) ? this.receiverUserID = t.to : t
					.conversationType.startsWith(_n.CONV_GROUP) && (this.receiverGroupID = t.to), this
					.messageReceiver = t.to;
				else {
					this.nick = t.nick || "", this.avatar = t.avatar || "", this.messageBody = [];
					var n = t.elements[0].type,
						r = t.elements[0].content;
					this._patchRichMediaPayload(n, r), n === _n.MSG_MERGER ? this.messageBody.push({
							type: n,
							payload: new vh(r).content
						}) : this.messageBody.push({
							type: n,
							payload: r
						}), t.groupID && (this.receiverGroupID = t.groupID, this.messageReceiver = t.groupID), t
						.to && (this.receiverUserID = t.to, this.messageReceiver = t.to)
				}
			}
			return En(e, [{
				key: "_patchRichMediaPayload",
				value: function(e, t) {
					e === _n.MSG_IMAGE ? t.imageInfoArray.forEach((function(e) {
							!e.imageUrl && e.url && (e.imageUrl = e.url, e.sizeType = e
								.type, 1 === e.type ? e.type = 0 : 3 === e.type && (
									e.type = 1))
						})) : e === _n.MSG_VIDEO ? !t.remoteVideoUrl && t.videoUrl && (t
							.remoteVideoUrl = t.videoUrl) : e === _n.MSG_AUDIO ? !t
						.remoteAudioUrl && t.url && (t.remoteAudioUrl = t.url) : e === _n
						.MSG_FILE && !t.fileUrl && t.url && (t.fileUrl = t.url, t.url = void 0)
				}
			}]), e
		}(),
		vh = function() {
			function e(t) {
				if (In(this, e), this.type = _n.MSG_MERGER, this.content = {
						downloadKey: "",
						pbDownloadKey: "",
						messageList: [],
						title: "",
						abstractList: [],
						compatibleText: "",
						version: 0,
						layersOverLimit: !1
					}, t.downloadKey) this.content.downloadKey = t.downloadKey, this.content.pbDownloadKey = t
					.pbDownloadKey;
				else if (ou(t.messageList)) 1 === t.layersOverLimit && (this.content.layersOverLimit = !0);
				else {
					var n = t.messageList,
						r = t.title,
						o = t.abstractList,
						i = t.compatibleText,
						a = t.version,
						s = [];
					n.forEach((function(e) {
							if (!ou(e)) {
								var t = new mh(e);
								s.push(t)
							}
						})), this.content.messageList = s, this.content.title = r, this.content.abstractList =
						o, this.content.compatibleText = i, this.content.version = a || 0
				}
				Ms.debug("MergerElement.content:", this.content)
			}
			return En(e, [{
				key: "sendable",
				value: function() {
					return !ou(this.content.messageList) || !ou(this.content.downloadKey)
				}
			}]), e
		}(),
		yh = {
			1: _n.MSG_PRIORITY_HIGH,
			2: _n.MSG_PRIORITY_NORMAL,
			3: _n.MSG_PRIORITY_LOW,
			4: _n.MSG_PRIORITY_LOWEST
		},
		_h = function() {
			function e(t) {
				In(this, e), this.ID = "", this.conversationID = t.conversationID || null, this
					.conversationType = t.conversationType || _n.CONV_C2C, this.conversationSubType = t
					.conversationSubType, this.time = t.time || Math.ceil(Date.now() / 1e3), this.sequence = t
					.sequence || 0, this.clientSequence = t.clientSequence || t.sequence || 0, this.random = t
					.random || xs(), this.priority = this._computePriority(t.priority), this.nick = t.nick ||
					"", this.avatar = t.avatar || "", this.isPeerRead = !1, this.nameCard = "", this
					._elements = [], this.isPlaceMessage = t.isPlaceMessage || 0, this.isRevoked = 2 === t
					.isPlaceMessage || 8 === t.msgFlagBits, this.geo = {}, this.from = t.from || null, this.to =
					t.to || null, this.flow = "", this.isSystemMessage = t.isSystemMessage || !1, this
					.protocol = t.protocol || "JSON", this.isResend = !1, this.isRead = !1, this.status = t
					.status || Qu.SUCCESS, this._onlineOnlyFlag = !1, this._groupAtInfoList = [], this
					._relayFlag = !1, this.atUserList = [], this.reInitialize(t.currentUser), this
					.extractGroupInfo(t.groupProfile || null), this.handleGroupAtInfo(t)
			}
			return En(e, [{
				key: "elements",
				get: function() {
					return Ms.warn(
						"！！！Message 实例的 elements 属性即将废弃，请尽快修改。使用 type 和 payload 属性处理单条消息，兼容组合消息使用 _elements 属性！！！"
						), this._elements
				}
			}, {
				key: "getElements",
				value: function() {
					return this._elements
				}
			}, {
				key: "extractGroupInfo",
				value: function(e) {
					if (null !== e) {
						Es(e.nick) && (this.nick = e.nick), Es(e.avatar) && (this.avatar = e
							.avatar);
						var t = e.messageFromAccountExtraInformation;
						Ts(t) && Es(t.nameCard) && (this.nameCard = t.nameCard)
					}
				}
			}, {
				key: "handleGroupAtInfo",
				value: function(e) {
					var t = this;
					e.payload && e.payload.atUserList && e.payload.atUserList.forEach((function(
						e) {
						e !== _n.MSG_AT_ALL ? (t._groupAtInfoList.push({
							groupAtAllFlag: 0,
							groupAtUserID: e
						}), t.atUserList.push(e)) : (t._groupAtInfoList.push({
							groupAtAllFlag: 1
						}), t.atUserList.push(_n.MSG_AT_ALL))
					})), Ds(e.groupAtInfo) && e.groupAtInfo.forEach((function(e) {
						1 === e.groupAtAllFlag ? t.atUserList.push(e
							.groupAtUserID) : 2 === e.groupAtAllFlag && t.atUserList
							.push(_n.MSG_AT_ALL)
					}))
				}
			}, {
				key: "getGroupAtInfoList",
				value: function() {
					return this._groupAtInfoList
				}
			}, {
				key: "_initProxy",
				value: function() {
					this.payload = this._elements[0].content, this.type = this._elements[0].type
				}
			}, {
				key: "reInitialize",
				value: function(e) {
					e && (this.status = this.from ? Qu.SUCCESS : Qu.UNSEND, !this.from && (this
							.from = e)), this._initFlow(e), this._initielizeSequence(e), this
						._concactConversationID(e), this.generateMessageID(e)
				}
			}, {
				key: "isSendable",
				value: function() {
					return 0 !== this._elements.length && ("function" != typeof this._elements[
							0].sendable ? (Ms.warn("".concat(this._elements[0].type,
							' need "boolean : sendable()" method')), !1) : this._elements[0]
						.sendable())
				}
			}, {
				key: "_initTo",
				value: function(e) {
					this.conversationType === _n.CONV_GROUP && (this.to = e.groupID)
				}
			}, {
				key: "_initielizeSequence",
				value: function(e) {
					0 === this.clientSequence && e && (this.clientSequence = function(e) {
						if (!e) return Ms.error(
							"autoincrementIndex(string: key) need key parameter"
							), !1;
						if (void 0 === js[e]) {
							var t = new Date,
								n = "3".concat(t.getHours()).slice(-2),
								r = "0".concat(t.getMinutes()).slice(-2),
								o = "0".concat(t.getSeconds()).slice(-2);
							js[e] = parseInt([n, r, o, "0001"].join("")), n = null, r =
								null, o = null, Ms.warn(
									"utils.autoincrementIndex() create new sequence : "
									.concat(e, " = ").concat(js[e]))
						}
						return js[e]++
					}(e)), 0 === this.sequence && this.conversationType === _n.CONV_C2C && (
						this.sequence = this.clientSequence)
				}
			}, {
				key: "generateMessageID",
				value: function(e) {
					var t = e === this.from ? 1 : 0,
						n = this.sequence > 0 ? this.sequence : this.clientSequence;
					this.ID = "".concat(this.conversationID, "-").concat(n, "-").concat(this
						.random, "-").concat(t)
				}
			}, {
				key: "_initFlow",
				value: function(e) {
					"" !== e && (e === this.from ? (this.flow = "out", this.isRead = !0) : this
						.flow = "in")
				}
			}, {
				key: "_concactConversationID",
				value: function(e) {
					var t = this.to,
						n = "",
						r = this.conversationType;
					r !== _n.CONV_SYSTEM ? (n = r === _n.CONV_C2C ? e === this.from ? t : this
							.from : this.to, this.conversationID = "".concat(r).concat(n)) :
						this.conversationID = _n.CONV_SYSTEM
				}
			}, {
				key: "isElement",
				value: function(e) {
					return e instanceof ec || e instanceof Sp || e instanceof Tp ||
						e instanceof Dp || e instanceof sh || e instanceof ch ||
						e instanceof Ap || e instanceof Rp || e instanceof uh ||
						e instanceof lh || e instanceof vh
				}
			}, {
				key: "setElement",
				value: function(e) {
					var t = this;
					if (this.isElement(e)) return this._elements = [e], void this._initProxy();
					var n = function(e) {
						switch (e.type) {
							case _n.MSG_TEXT:
								t.setTextElement(e.content);
								break;
							case _n.MSG_IMAGE:
								t.setImageElement(e.content);
								break;
							case _n.MSG_AUDIO:
								t.setAudioElement(e.content);
								break;
							case _n.MSG_FILE:
								t.setFileElement(e.content);
								break;
							case _n.MSG_VIDEO:
								t.setVideoElement(e.content);
								break;
							case _n.MSG_CUSTOM:
								t.setCustomElement(e.content);
								break;
							case _n.MSG_GEO:
								t.setGEOElement(e.content);
								break;
							case _n.MSG_GRP_TIP:
								t.setGroupTipElement(e.content);
								break;
							case _n.MSG_GRP_SYS_NOTICE:
								t.setGroupSystemNoticeElement(e.content);
								break;
							case _n.MSG_FACE:
								t.setFaceElement(e.content);
								break;
							case _n.MSG_MERGER:
								t.setMergerElement(e.content);
								break;
							default:
								Ms.warn(e.type, e.content, "no operation......")
						}
					};
					if (Ds(e))
						for (var r = 0; r < e.length; r++) n(e[r]);
					else n(e);
					this._initProxy()
				}
			}, {
				key: "clearElement",
				value: function() {
					this._elements.length = 0
				}
			}, {
				key: "setTextElement",
				value: function(e) {
					var t = "string" == typeof e ? e : e.text,
						n = new ec({
							text: t
						});
					this._elements.push(n)
				}
			}, {
				key: "setImageElement",
				value: function(e) {
					var t = new Sp(e);
					this._elements.push(t)
				}
			}, {
				key: "setAudioElement",
				value: function(e) {
					var t = new Dp(e);
					this._elements.push(t)
				}
			}, {
				key: "setFileElement",
				value: function(e) {
					var t = new sh(e);
					this._elements.push(t)
				}
			}, {
				key: "setVideoElement",
				value: function(e) {
					var t = new ch(e);
					this._elements.push(t)
				}
			}, {
				key: "setGEOElement",
				value: function(e) {
					var t = new lh(e);
					this._elements.push(t)
				}
			}, {
				key: "setCustomElement",
				value: function(e) {
					var t = new uh(e);
					this._elements.push(t)
				}
			}, {
				key: "setGroupTipElement",
				value: function(e) {
					var t = {},
						n = e.operationType;
					ou(e.memberInfoList) || n !== _n.GRP_TIP_MBR_JOIN && n !== _n
						.GRP_TIP_MBR_KICKED_OUT ? e.operatorInfo && (t = e.operatorInfo) : t = e
						.memberInfoList[0];
					var r = t,
						o = r.nick,
						i = r.avatar;
					Es(o) && (this.nick = o), Es(i) && (this.avatar = i);
					var a = new Ap(e);
					this._elements.push(a)
				}
			}, {
				key: "setGroupSystemNoticeElement",
				value: function(e) {
					var t = new Rp(e);
					this._elements.push(t)
				}
			}, {
				key: "setFaceElement",
				value: function(e) {
					var t = new Tp(e);
					this._elements.push(t)
				}
			}, {
				key: "setMergerElement",
				value: function(e) {
					var t = new vh(e);
					this._elements.push(t)
				}
			}, {
				key: "setIsRead",
				value: function(e) {
					this.isRead = e
				}
			}, {
				key: "setRelayFlag",
				value: function(e) {
					this._relayFlag = e
				}
			}, {
				key: "getRelayFlag",
				value: function() {
					return this._relayFlag
				}
			}, {
				key: "setOnlineOnlyFlag",
				value: function(e) {
					this._onlineOnlyFlag = e
				}
			}, {
				key: "getOnlineOnlyFlag",
				value: function() {
					return this._onlineOnlyFlag
				}
			}, {
				key: "_computePriority",
				value: function(e) {
					if (ks(e)) return _n.MSG_PRIORITY_NORMAL;
					if (Es(e) && -1 !== Object.values(yh).indexOf(e)) return e;
					if (Cs(e)) {
						var t = "" + e;
						if (-1 !== Object.keys(yh).indexOf(t)) return yh[t]
					}
					return _n.MSG_PRIORITY_NORMAL
				}
			}, {
				key: "setNickAndAvatar",
				value: function(e) {
					var t = e.nick,
						n = e.avatar;
					Es(t) && (this.nick = t), Es(n) && (this.avatar = n)
				}
			}]), e
		}(),
		Mh = function(e) {
			return !!e && (!!(function(e) {
				return Es(e) && e.slice(0, 3) === _n.CONV_C2C
			}(e) || function(e) {
				return Es(e) && e.slice(0, 5) === _n.CONV_GROUP
			}(e) || Xs(e)) || (console.warn("非法的会话 ID:".concat(e,
				"。会话 ID 组成方式：C2C + userID（单聊）GROUP + groupID（群聊）@TIM#SYSTEM（系统通知会话）")), !1))
		},
		Ih = "请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#",
		Ch = function(e) {
			return e.param ? "".concat(e.api, " ").concat(e.param, " ").concat(e.desc, "。").concat(Ih).concat(e
				.api) : "".concat(e.api, " ").concat(e.desc, "。").concat(Ih).concat(e.api)
		},
		Eh = {
			type: "String",
			required: !0
		},
		Sh = {
			type: "Array",
			required: !0
		},
		Th = {
			type: "Object",
			required: !0
		},
		Dh = {
			login: {
				userID: Eh,
				userSig: Eh
			},
			addToBlacklist: {
				userIDList: Sh
			},
			on: [{
				name: "eventName",
				type: "String",
				validator: function(e) {
					return "string" == typeof e && 0 !== e.length || (console.warn(Ch({
						api: "on",
						param: "eventName",
						desc: "类型必须为 String，且不能为空"
					})), !1)
				}
			}, {
				name: "handler",
				type: "Function",
				validator: function(e) {
					return "function" != typeof e ? (console.warn(Ch({
						api: "on",
						param: "handler",
						desc: "参数必须为 Function"
					})), !1) : ("" === e.name && console.warn(
						"on 接口的 handler 参数推荐使用具名函数。具名函数可以使用 off 接口取消订阅，匿名函数无法取消订阅。"), !0)
				}
			}],
			once: [{
				name: "eventName",
				type: "String",
				validator: function(e) {
					return "string" == typeof e && 0 !== e.length || (console.warn(Ch({
						api: "once",
						param: "eventName",
						desc: "类型必须为 String，且不能为空"
					})), !1)
				}
			}, {
				name: "handler",
				type: "Function",
				validator: function(e) {
					return "function" != typeof e ? (console.warn(Ch({
						api: "once",
						param: "handler",
						desc: "参数必须为 Function"
					})), !1) : ("" === e.name && console.warn("once 接口的 handler 参数推荐使用具名函数。"), !
						0)
				}
			}],
			off: [{
				name: "eventName",
				type: "String",
				validator: function(e) {
					return "string" == typeof e && 0 !== e.length || (console.warn(Ch({
						api: "off",
						param: "eventName",
						desc: "类型必须为 String，且不能为空"
					})), !1)
				}
			}, {
				name: "handler",
				type: "Function",
				validator: function(e) {
					return "function" != typeof e ? (console.warn(Ch({
						api: "off",
						param: "handler",
						desc: "参数必须为 Function"
					})), !1) : ("" === e.name && console.warn("off 接口无法为匿名函数取消监听事件。"), !0)
				}
			}],
			sendMessage: [Dn({
				name: "message"
			}, Th)],
			getMessageList: {
				conversationID: Dn(Dn({}, Eh), {}, {
					validator: function(e) {
						return Mh(e)
					}
				}),
				nextReqMessageID: {
					type: "String"
				},
				count: {
					type: "Number",
					validator: function(e) {
						return !(!ks(e) && !/^[1-9][0-9]*$/.test(e)) || (console.warn(Ch({
							api: "getMessageList",
							param: "count",
							desc: "必须为正整数"
						})), !1)
					}
				}
			},
			setMessageRead: {
				conversationID: Dn(Dn({}, Eh), {}, {
					validator: function(e) {
						return Mh(e)
					}
				})
			},
			getConversationProfile: [Dn(Dn({
				name: "conversationID"
			}, Eh), {}, {
				validator: function(e) {
					return Mh(e)
				}
			})],
			deleteConversation: [Dn(Dn({
				name: "conversationID"
			}, Eh), {}, {
				validator: function(e) {
					return Mh(e)
				}
			})],
			getGroupList: {
				groupProfileFilter: {
					type: "Array"
				}
			},
			getGroupProfile: {
				groupID: Eh,
				groupCustomFieldFilter: {
					type: "Array"
				},
				memberCustomFieldFilter: {
					type: "Array"
				}
			},
			getGroupProfileAdvance: {
				groupIDList: Sh
			},
			createGroup: {
				name: Eh
			},
			joinGroup: {
				groupID: Eh,
				type: {
					type: "String"
				},
				applyMessage: {
					type: "String"
				}
			},
			quitGroup: [Dn({
				name: "groupID"
			}, Eh)],
			handleApplication: {
				message: Th,
				handleAction: Eh,
				handleMessage: {
					type: "String"
				}
			},
			changeGroupOwner: {
				groupID: Eh,
				newOwnerID: Eh
			},
			updateGroupProfile: {
				groupID: Eh,
				muteAllMembers: {
					type: "Boolean"
				}
			},
			dismissGroup: [Dn({
				name: "groupID"
			}, Eh)],
			searchGroupByID: [Dn({
				name: "groupID"
			}, Eh)],
			getGroupMemberList: {
				groupID: Eh,
				offset: {
					type: "Number"
				},
				count: {
					type: "Number"
				}
			},
			getGroupMemberProfile: {
				groupID: Eh,
				userIDList: Sh,
				memberCustomFieldFilter: {
					type: "Array"
				}
			},
			addGroupMember: {
				groupID: Eh,
				userIDList: Sh
			},
			setGroupMemberRole: {
				groupID: Eh,
				userID: Eh,
				role: Eh
			},
			setGroupMemberMuteTime: {
				groupID: Eh,
				userID: Eh,
				muteTime: {
					type: "Number",
					validator: function(e) {
						return e >= 0
					}
				}
			},
			setGroupMemberNameCard: {
				groupID: Eh,
				userID: {
					type: "String"
				},
				nameCard: Dn(Dn({}, Eh), {}, {
					validator: function(e) {
						return !0 !== /^\s+$/.test(e)
					}
				})
			},
			setMessageRemindType: {
				groupID: Eh,
				messageRemindType: Eh
			},
			setGroupMemberCustomField: {
				groupID: Eh,
				userID: {
					type: "String"
				},
				memberCustomField: Sh
			},
			deleteGroupMember: {
				groupID: Eh
			},
			createTextMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						return Ts(e) ? Es(e.text) ? 0 !== e.text.length || (console.warn(Ch({
							api: "createTextMessage",
							desc: "消息内容不能为空"
						})), !1) : (console.warn(Ch({
							api: "createTextMessage",
							param: "payload.text",
							desc: "类型必须为 String"
						})), !1) : (console.warn(Ch({
							api: "createTextMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1)
					}
				})
			},
			createTextAtMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						return Ts(e) ? Es(e.text) ? 0 === e.text.length ? (console.warn(Ch({
							api: "createTextAtMessage",
							desc: "消息内容不能为空"
						})), !1) : !(e.atUserList && !Ds(e.atUserList)) || (console.warn(Ch({
							api: "createTextAtMessage",
							desc: "payload.atUserList 类型必须为数组"
						})), !1) : (console.warn(Ch({
							api: "createTextAtMessage",
							param: "payload.text",
							desc: "类型必须为 String"
						})), !1) : (console.warn(Ch({
							api: "createTextAtMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1)
					}
				})
			},
			createCustomMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						return Ts(e) ? e.data && !Es(e.data) ? (console.warn(Ch({
							api: "createCustomMessage",
							param: "payload.data",
							desc: "类型必须为 String"
						})), !1) : e.description && !Es(e.description) ? (console.warn(Ch({
							api: "createCustomMessage",
							param: "payload.description",
							desc: "类型必须为 String"
						})), !1) : !(e.extension && !Es(e.extension)) || (console.warn(Ch({
							api: "createCustomMessage",
							param: "payload.extension",
							desc: "类型必须为 String"
						})), !1) : (console.warn(Ch({
							api: "createCustomMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1)
					}
				})
			},
			createImageMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						if (!Ts(e)) return console.warn(Ch({
							api: "createImageMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1;
						if (ks(e.file)) return console.warn(Ch({
							api: "createImageMessage",
							param: "payload.file",
							desc: "不能为 undefined"
						})), !1;
						if (Va) {
							if (!(e.file instanceof HTMLInputElement || Is(e.file))) return console
								.warn(Ch({
									api: "createImageMessage",
									param: "payload.file",
									desc: "类型必须是 HTMLInputElement 或 File"
								})), !1;
							if (e.file instanceof HTMLInputElement && 0 === e.file.files.length)
								return console.warn(Ch({
									api: "createImageMessage",
									param: "payload.file",
									desc: "您没有选择文件，无法发送"
								})), !1
						}
						return !0
					},
					onProgress: {
						type: "Function",
						required: !1,
						validator: function(e) {
							return ks(e) && console.warn(Ch({
								api: "createImageMessage",
								desc: "没有 onProgress 回调，您将无法获取上传进度"
							})), !0
						}
					}
				})
			},
			createAudioMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						return !!Ts(e) || (console.warn(Ch({
							api: "createAudioMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1)
					}
				}),
				onProgress: {
					type: "Function",
					required: !1,
					validator: function(e) {
						return ks(e) && console.warn(Ch({
							api: "createAudioMessage",
							desc: "没有 onProgress 回调，您将无法获取上传进度"
						})), !0
					}
				}
			},
			createVideoMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						if (!Ts(e)) return console.warn(Ch({
							api: "createVideoMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1;
						if (ks(e.file)) return console.warn(Ch({
							api: "createVideoMessage",
							param: "payload.file",
							desc: "不能为 undefined"
						})), !1;
						if (Va) {
							if (!(e.file instanceof HTMLInputElement || Is(e.file))) return console
								.warn(Ch({
									api: "createVideoMessage",
									param: "payload.file",
									desc: "类型必须是 HTMLInputElement 或 File"
								})), !1;
							if (e.file instanceof HTMLInputElement && 0 === e.file.files.length)
								return console.warn(Ch({
									api: "createVideoMessage",
									param: "payload.file",
									desc: "您没有选择文件，无法发送"
								})), !1
						}
						return !0
					}
				}),
				onProgress: {
					type: "Function",
					required: !1,
					validator: function(e) {
						return ks(e) && console.warn(Ch({
							api: "createVideoMessage",
							desc: "没有 onProgress 回调，您将无法获取上传进度"
						})), !0
					}
				}
			},
			createFaceMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						return Ts(e) ? Cs(e.index) ? !!Es(e.data) || (console.warn(Ch({
							api: "createFaceMessage",
							param: "payload.data",
							desc: "类型必须为 String"
						})), !1) : (console.warn(Ch({
							api: "createFaceMessage",
							param: "payload.index",
							desc: "类型必须为 Number"
						})), !1) : (console.warn(Ch({
							api: "createFaceMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1)
					}
				})
			},
			createFileMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						if (!Ts(e)) return console.warn(Ch({
							api: "createFileMessage",
							param: "payload",
							desc: "类型必须为 plain object"
						})), !1;
						if (ks(e.file)) return console.warn(Ch({
							api: "createFileMessage",
							param: "payload.file",
							desc: "不能为 undefined"
						})), !1;
						if (Va) {
							if (!(e.file instanceof HTMLInputElement || Is(e.file))) return console
								.warn(Ch({
									api: "createFileMessage",
									param: "payload.file",
									desc: "类型必须是 HTMLInputElement 或 File"
								})), !1;
							if (e.file instanceof HTMLInputElement && 0 === e.file.files.length)
								return console.warn(Ch({
									api: "createFileMessage",
									desc: "您没有选择文件，无法发送"
								})), !1
						}
						return !0
					}
				}),
				onProgress: {
					type: "Function",
					required: !1,
					validator: function(e) {
						return ks(e) && console.warn(Ch({
							api: "createFileMessage",
							desc: "没有 onProgress 回调，您将无法获取上传进度"
						})), !0
					}
				}
			},
			createMergerMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						if (ou(e.messageList)) return console.warn(Ch({
							api: "createMergerMessage",
							desc: "不能为空数组"
						})), !1;
						if (ou(e.compatibleText)) return console.warn(Ch({
							api: "createMergerMessage",
							desc: "类型必须为 String，且不能为空"
						})), !1;
						var t = !1;
						return e.messageList.forEach((function(e) {
							e.status === Qu.FAIL && (t = !0)
						})), !t || (console.warn(Ch({
							api: "createMergerMessage",
							desc: "不支持合并已发送失败的消息"
						})), !1)
					}
				})
			},
			forwardMessage: {
				to: Eh,
				conversationType: Eh,
				payload: Dn(Dn({}, Th), {}, {
					validator: function(e) {
						return e instanceof _h ? e.conversationType === _n.CONV_SYSTEM ? (console
								.warn("forwardMessage 不能转发系统会话消息，只能转发单聊消息或群消息"), !1) : !0 !== e
							.isRevoked || (console.warn("forwardMessage 不能转发已被撤回的消息"), !1) : (
								console.warn("forwardMessage 参数 message 必须为 Message(".concat(Ih,
									"Message.html) 实例。")), !1)
					}
				})
			},
			revokeMessage: [Dn(Dn({
				name: "message"
			}, Th), {}, {
				validator: function(e) {
					return e instanceof _h ? e.conversationType === _n.CONV_SYSTEM ? (console
							.warn("revokeMessage 不能撤回系统会话消息，只能撤回单聊消息或群消息"), !1) : !0 !== e
						.isRevoked || (console.warn("revokeMessage 消息已经被撤回，请勿重复操作"), !1) : (
							console.warn("revokeMessage 参数 message 必须为 Message(".concat(Ih,
								"Message.html) 实例。")), !1)
				}
			})],
			getUserProfile: {
				userIDList: {
					type: "Array",
					validator: function(e) {
						return Ds(e) ? (0 === e.length && console.warn(Ch({
							api: "getUserProfile",
							param: "userIDList",
							desc: "不能为空数组"
						})), !0) : (console.warn(Ch({
							api: "getUserProfile",
							param: "userIDList",
							desc: "必须为数组"
						})), !1)
					}
				}
			},
			updateMyProfile: {
				profileCustomField: {
					type: "Array",
					validator: function(e) {
						return !!ks(e) || (!!Ds(e) || (console.warn(Ch({
							api: "updateMyProfile",
							param: "profileCustomField",
							desc: "必须为数组"
						})), !1))
					}
				}
			}
		},
		kh = {
			login: "login",
			logout: "logout",
			on: "on",
			once: "once",
			off: "off",
			setLogLevel: "setLogLevel",
			registerPlugin: "registerPlugin",
			destroy: "destroy",
			createTextMessage: "createTextMessage",
			createTextAtMessage: "createTextAtMessage",
			createImageMessage: "createImageMessage",
			createAudioMessage: "createAudioMessage",
			createVideoMessage: "createVideoMessage",
			createCustomMessage: "createCustomMessage",
			createFaceMessage: "createFaceMessage",
			createFileMessage: "createFileMessage",
			createMergerMessage: "createMergerMessage",
			downloadMergerMessage: "downloadMergerMessage",
			createForwardMessage: "createForwardMessage",
			sendMessage: "sendMessage",
			resendMessage: "resendMessage",
			getMessageList: "getMessageList",
			setMessageRead: "setMessageRead",
			revokeMessage: "revokeMessage",
			getConversationList: "getConversationList",
			getConversationProfile: "getConversationProfile",
			deleteConversation: "deleteConversation",
			getGroupList: "getGroupList",
			getGroupProfile: "getGroupProfile",
			createGroup: "createGroup",
			joinGroup: "joinGroup",
			updateGroupProfile: "updateGroupProfile",
			quitGroup: "quitGroup",
			dismissGroup: "dismissGroup",
			changeGroupOwner: "changeGroupOwner",
			searchGroupByID: "searchGroupByID",
			setMessageRemindType: "setMessageRemindType",
			handleGroupApplication: "handleGroupApplication",
			getGroupMemberProfile: "getGroupMemberProfile",
			getGroupMemberList: "getGroupMemberList",
			addGroupMember: "addGroupMember",
			deleteGroupMember: "deleteGroupMember",
			setGroupMemberNameCard: "setGroupMemberNameCard",
			setGroupMemberMuteTime: "setGroupMemberMuteTime",
			setGroupMemberRole: "setGroupMemberRole",
			setGroupMemberCustomField: "setGroupMemberCustomField",
			getGroupOnlineMemberCount: "getGroupOnlineMemberCount",
			getMyProfile: "getMyProfile",
			getUserProfile: "getUserProfile",
			updateMyProfile: "updateMyProfile",
			getBlacklist: "getBlacklist",
			addToBlacklist: "addToBlacklist",
			removeFromBlacklist: "removeFromBlacklist",
			getFriendList: "getFriendList",
			callExperimentalAPI: "callExperimentalAPI"
		},
		Ah = !!si && o((function() {
			si.prototype.finally.call({
				then: function() {}
			}, (function() {}))
		}));
	Re({
		target: "Promise",
		proto: !0,
		real: !0,
		forced: Ah
	}, {
		finally: function(e) {
			var t = gi(this, re("Promise")),
				n = "function" == typeof e;
			return this.then(n ? function(n) {
				return ea(t, e()).then((function() {
					return n
				}))
			} : e, n ? function(n) {
				return ea(t, e()).then((function() {
					throw n
				}))
			} : e)
		}
	}), "function" != typeof si || si.prototype.finally || ee(si.prototype, "finally", re("Promise")
		.prototype.finally);
	var Oh = "1.7.3",
		Rh = "537048168",
		Nh = "10",
		Lh = "protobuf",
		wh = "json",
		bh = 1,
		Ph = 2,
		Gh = 3,
		Uh = 4,
		qh = {
			HOST: {
				CURRENT: {
					COMMON: "https://webim.tim.qq.com",
					PIC: "https://pic.tim.qq.com",
					COS: "https://yun.tim.qq.com"
				},
				PRODUCTION: {
					COMMON: "https://webim.tim.qq.com",
					PIC: "https://pic.tim.qq.com",
					COS: "https://yun.tim.qq.com"
				},
				OVERSEA_PRODUCTION: {
					COMMON: "https://api.im.qcloud.com",
					PIC: "https://api.im.qcloud.com",
					COS: "https://api.im.qcloud.com"
				},
				SANDBOX: {
					COMMON: "https://events.tim.qq.com",
					PIC: "https://pic.tim.qq.com",
					COS: "https://yun.tim.qq.com"
				},
				TEST: {
					COMMON: "https://test.tim.qq.com",
					PIC: "https://pic.tim.qq.com",
					COS: "https://test.tim.qq.com"
				},
				setCurrent: function() {
					var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 3;
					e === bh ? this.CURRENT = this.SANDBOX : e === Ph ? this.CURRENT = this.TEST : e ===
						Gh ? this.CURRENT = this.PRODUCTION : e === Uh && (this.CURRENT = this
							.OVERSEA_PRODUCTION)
				}
			},
			NAME: {
				OPEN_IM: "openim",
				GROUP: "group_open_http_svc",
				FRIEND: "sns",
				PROFILE: "profile",
				RECENT_CONTACT: "recentcontact",
				PIC: "openpic",
				BIG_GROUP_NO_AUTH: "group_open_http_noauth_svc",
				BIG_GROUP_LONG_POLLING: "group_open_long_polling_http_svc",
				BIG_GROUP_LONG_POLLING_NO_AUTH: "group_open_long_polling_http_noauth_svc",
				IM_OPEN_STAT: "imopenstat",
				WEB_IM: "webim",
				IM_COS_SIGN: "im_cos_sign_svr",
				IM_LONG_MESSAGE: "im_long_msg",
				IM_COS_MESSAGE: "im_cos_msg"
			},
			CMD: {
				ACCESS_LAYER: "accesslayer",
				LOGIN: "login",
				LOGOUT_LONG_POLL: "longpollinglogout",
				LOGOUT_ALL: "logout",
				PORTRAIT_GET: "portrait_get_all",
				PORTRAIT_SET: "portrait_set",
				GET_LONG_POLL_ID: "getlongpollingid",
				LONG_POLL: "longpolling",
				AVCHATROOM_LONG_POLL: "get_msg",
				FRIEND_ADD: "friend_add",
				FRIEND_GET_ALL: "friend_get_all",
				FRIEND_DELETE: "friend_delete",
				RESPONSE_PENDENCY: "friend_response",
				GET_PENDENCY: "pendency_get",
				DELETE_PENDENCY: "pendency_delete",
				GET_GROUP_PENDENCY: "get_pendency",
				GET_BLACKLIST: "black_list_get",
				ADD_BLACKLIST: "black_list_add",
				DELETE_BLACKLIST: "black_list_delete",
				CREATE_GROUP: "create_group",
				GET_JOINED_GROUPS: "get_joined_group_list",
				SEND_MESSAGE: "sendmsg",
				REVOKE_C2C_MESSAGE: "msgwithdraw",
				SEND_GROUP_MESSAGE: "send_group_msg",
				REVOKE_GROUP_MESSAGE: "group_msg_recall",
				GET_GROUP_INFO: "get_group_info",
				GET_GROUP_MEMBER_INFO: "get_specified_group_member_info",
				GET_GROUP_MEMBER_LIST: "get_group_member_info",
				QUIT_GROUP: "quit_group",
				CHANGE_GROUP_OWNER: "change_group_owner",
				DESTROY_GROUP: "destroy_group",
				ADD_GROUP_MEMBER: "add_group_member",
				DELETE_GROUP_MEMBER: "delete_group_member",
				SEARCH_GROUP_BY_ID: "get_group_public_info",
				APPLY_JOIN_GROUP: "apply_join_group",
				HANDLE_APPLY_JOIN_GROUP: "handle_apply_join_group",
				MODIFY_GROUP_INFO: "modify_group_base_info",
				MODIFY_GROUP_MEMBER_INFO: "modify_group_member_info",
				DELETE_GROUP_SYSTEM_MESSAGE: "deletemsg",
				DELETE_GROUP_AT_TIPS: "deletemsg",
				GET_CONVERSATION_LIST: "get",
				PAGING_GET_CONVERSATION_LIST: "page_get",
				DELETE_CONVERSATION: "delete",
				GET_MESSAGES: "getmsg",
				GET_C2C_ROAM_MESSAGES: "getroammsg",
				GET_GROUP_ROAM_MESSAGES: "group_msg_get",
				SET_C2C_MESSAGE_READ: "msgreaded",
				GET_PEER_READ_TIME: "get_peer_read_time",
				SET_GROUP_MESSAGE_READ: "msg_read_report",
				FILE_READ_AND_WRITE_AUTHKEY: "authkey",
				FILE_UPLOAD: "pic_up",
				COS_SIGN: "cos",
				COS_PRE_SIG: "pre_sig",
				TIM_WEB_REPORT: "tim_web_report",
				BIG_DATA_HALLWAY_AUTH_KEY: "authkey",
				GET_ONLINE_MEMBER_NUM: "get_online_member_num",
				DOWNLOAD_MERGER_MESSAGE: "get_relay_json_msg",
				UPLOAD_MERGER_MESSAGE: "save_relay_json_msg"
			},
			CHANNEL: {
				SOCKET: 1,
				XHR: 2,
				AUTO: 0
			},
			NAME_VERSION: {
				openim: "v4",
				group_open_http_svc: "v4",
				sns: "v4",
				profile: "v4",
				recentcontact: "v4",
				openpic: "v4",
				group_open_http_noauth_svc: "v4",
				group_open_long_polling_http_svc: "v4",
				group_open_long_polling_http_noauth_svc: "v4",
				imopenstat: "v4",
				im_cos_sign_svr: "v4",
				im_cos_msg: "v4",
				webim: "v4",
				im_long_msg: "v4"
			}
		};
	qh.HOST.setCurrent(Gh);
	var xh = {
			request: {
				toAccount: "To_Account",
				fromAccount: "From_Account",
				to: "To_Account",
				from: "From_Account",
				groupID: "GroupId",
				groupAtUserID: "GroupAt_Account",
				receiverUserID: "To_Account",
				receiverGroupID: "GroupId",
				messageSender: "SenderId",
				messageReceiver: "ReceiverId",
				nick: "From_AccountNick",
				avatar: "From_AccountHeadurl",
				messageNumber: "MsgNum",
				pbDownloadKey: "PbMsgKey",
				downloadKey: "JsonMsgKey"
			},
			response: {
				GroupId: "groupID",
				Member_Account: "userID",
				MsgList: "messageList",
				SyncFlag: "syncFlag",
				To_Account: "to",
				From_Account: "from",
				MsgSeq: "sequence",
				MsgRandom: "random",
				MsgTimeStamp: "time",
				MsgContent: "content",
				MsgBody: "elements",
				From_AccountNick: "nick",
				From_AccountHeadurl: "avatar",
				GroupWithdrawInfoArray: "revokedInfos",
				GroupReadInfoArray: "groupMessageReadNotice",
				LastReadMsgSeq: "lastMessageSeq",
				WithdrawC2cMsgNotify: "c2cMessageRevokedNotify",
				C2cWithdrawInfoArray: "revokedInfos",
				C2cReadedReceipt: "c2cMessageReadReceipt",
				ReadC2cMsgNotify: "c2cMessageReadNotice",
				LastReadTime: "peerReadTime",
				MsgRand: "random",
				MsgType: "type",
				MsgShow: "messageShow",
				NextMsgSeq: "nextMessageSeq",
				FaceUrl: "avatar",
				ProfileDataMod: "profileModify",
				Profile_Account: "userID",
				ValueBytes: "value",
				ValueNum: "value",
				NoticeSeq: "noticeSequence",
				NotifySeq: "notifySequence",
				MsgFrom_AccountExtraInfo: "messageFromAccountExtraInformation",
				Operator_Account: "operatorID",
				OpType: "operationType",
				ReportType: "operationType",
				UserId: "userID",
				User_Account: "userID",
				List_Account: "userIDList",
				MsgOperatorMemberExtraInfo: "operatorInfo",
				MsgMemberExtraInfo: "memberInfoList",
				ImageUrl: "avatar",
				NickName: "nick",
				MsgGroupNewInfo: "newGroupProfile",
				MsgAppDefinedData: "groupCustomField",
				Owner_Account: "ownerID",
				GroupName: "name",
				GroupFaceUrl: "avatar",
				GroupIntroduction: "introduction",
				GroupNotification: "notification",
				GroupApplyJoinOption: "joinOption",
				MsgKey: "messageKey",
				GroupInfo: "groupProfile",
				ShutupTime: "muteTime",
				Desc: "description",
				Ext: "extension",
				GroupAt_Account: "groupAtUserID",
				MsgNum: "messageNumber",
				PbMsgKey: "pbDownloadKey",
				JsonMsgKey: "downloadKey"
			},
			ignoreKeyWord: ["C2C", "ID", "USP"]
		},
		Fh = "_contextWasUpdated",
		Vh = "_contextWasReset",
		Bh = "_a2KeyAndTinyIDUpdated",
		jh = "_specifiedConfigUpdated",
		Kh = "_noticeIsSynchronizing",
		Hh = "_noticeIsSynchronized",
		$h = "_messageSent",
		zh = "_syncMessageProcessing",
		Wh = "_syncMessageFinished",
		Yh = "_receiveInstantMessage",
		Jh = "_receiveGroupInstantMessage",
		Xh = "_receveGroupSystemNotice",
		Qh = "_messageRevoked",
		Zh = "_longPollGetIDFailed",
		ed = "_longPollRequestFailed",
		td = "_longPollResponseOK",
		nd = "_longPollKickedOut",
		rd = "_longPollMitipuleDeviceKickedOut",
		od = "_longPollGetNewC2CNotice",
		id = "_longPollGetNewGroupMessages",
		ad = "_longPollGetNewGroupTips",
		sd = "_longPollGetNewGroupAtTips",
		ud = "_longPollGetNewGroupNotice",
		cd = "_longPollGetNewFriendMessages",
		ld = "_longPollProfileModified",
		pd = " _longpollGroupMessageRevoked",
		fd = " _longpollGroupMessageReadNotice",
		hd = "_longpollC2CMessageRevoked",
		dd = "_longpollC2CMessageReadReceipt",
		gd = "_longpollC2CMessageReadNotice",
		md = "_avlongPollRequestFailed",
		vd = "_avlongPollResponseOK",
		yd = "_onGroupListUpdated",
		_d = "_loginSuccess",
		Md = "_signLogoutExcuting",
		Id = "_logoutSuccess",
		Cd = "_a2keyExpired",
		Ed = "_errorHasBeenDetected",
		Sd = "_onConversationListUpdated",
		Td = "_onConversationListProfileUpdated",
		Dd = "_conversationDeleted",
		kd = "onProfileUpdated",
		Ad = "joinAVChatRoomSuccess",
		Od = "joinAVChatRoomSuccessNoAuth",
		Rd = "_sdkStateReady",
		Nd = "_sdkReload",
		Ld = ut.filter,
		wd = hn("filter");
	Re({
		target: "Array",
		proto: !0,
		forced: !wd
	}, {
		filter: function(e) {
			return Ld(this, e, arguments.length > 1 ? arguments[1] : void 0)
		}
	});
	var bd = cr.trim;

	function Pd(e, t) {
		if ("string" != typeof e && !Array.isArray(e)) throw new TypeError(
			"Expected the input to be `string | string[]`");
		t = Object.assign({
			pascalCase: !1
		}, t);
		var n;
		return 0 === (e = Array.isArray(e) ? e.map((function(e) {
				return e.trim()
			})).filter((function(e) {
				return e.length
			})).join("-") : e.trim()).length ? "" : 1 === e.length ? t.pascalCase ? e.toUpperCase() : e
			.toLowerCase() : (e !== e.toLowerCase() && (e = Gd(e)), e = e.replace(/^[_.\- ]+/, "").toLowerCase()
				.replace(/[_.\- ]+(\w|$)/g, (function(e, t) {
					return t.toUpperCase()
				})).replace(/\d+(\w|$)/g, (function(e) {
					return e.toUpperCase()
				})), n = e, t.pascalCase ? n.charAt(0).toUpperCase() + n.slice(1) : n)
	}
	Re({
		target: "String",
		proto: !0,
		forced: function(e) {
			return o((function() {
				return !!or[e]() || "​᠎" != "​᠎" [e]() || or[e].name !== e
			}))
		}("trim")
	}, {
		trim: function() {
			return bd(this)
		}
	});
	var Gd = function(e) {
		for (var t = !1, n = !1, r = !1, o = 0; o < e.length; o++) {
			var i = e[o];
			t && /[a-zA-Z]/.test(i) && i.toUpperCase() === i ? (e = e.slice(0, o) + "-" + e.slice(o), t = !
				1, r = n, n = !0, o++) : n && r && /[a-zA-Z]/.test(i) && i.toLowerCase() === i ? (e = e
				.slice(0, o - 1) + "-" + e.slice(o - 1), r = n, n = !1, t = !0) : (t = i
			.toLowerCase() === i && i.toUpperCase() !== i, r = n, n = i.toUpperCase() === i && i
				.toLowerCase() !== i)
		}
		return e
	};

	function Ud(e, t, n) {
		var r = [],
			o = 0,
			i = function e(t, n) {
				if (++o > 100) return o--, t;
				if (Ds(t)) {
					var i = t.map((function(t) {
						return Ss(t) ? e(t, n) : t
					}));
					return o--, i
				}
				if (Ss(t)) {
					var a = (s = t, u = function(e, t) {
						if (!Ls(t)) return !1;
						if ((a = t) !== Pd(a)) {
							for (var o = !0, i = 0; i < xh.ignoreKeyWord.length; i++)
								if (t.includes(xh.ignoreKeyWord[i])) {
									o = !1;
									break
								} o && r.push(t)
						}
						var a;
						return ks(n[t]) ? function(e) {
							return "OPPOChannelID" === e ? e : e[0].toUpperCase() + Pd(e).slice(1)
						}(t) : n[t]
					}, c = Object.create(null), Object.keys(s).forEach((function(e) {
						var t = u(s[e], e);
						t && (c[t] = s[e])
					})), c);
					return a = Qs(a, (function(t, r) {
						return Ds(t) || Ss(t) ? e(t, n) : t
					})), o--, a
				}
				var s, u, c
			}(e, t = Dn(Dn({}, xh.request), t));
		return r.length > 0 && n.innerEmitter.emit(Ed, {
			code: Bp.CONVERTOR_IRREGULAR_PARAMS,
			message: Jf
		}), i
	}

	function qd(e, t) {
		if (t = Dn(Dn({}, xh.response), t), Ds(e)) return e.map((function(e) {
			return Ss(e) ? qd(e, t) : e
		}));
		if (Ss(e)) {
			var n = (r = e, o = function(e, n) {
				return ks(t[n]) ? Pd(n) : t[n]
			}, i = {}, Object.keys(r).forEach((function(e) {
				i[o(r[e], e)] = r[e]
			})), i);
			return n = Qs(n, (function(e) {
				return Ds(e) || Ss(e) ? qd(e, t) : e
			}))
		}
		var r, o, i
	}
	var xd = function() {
			function e(t) {
				var n = this;
				In(this, e), this.url = "", this.requestData = null, this.method = t.method || "POST", this
					.callback = function(e) {
						return qd(e = t.decode(e), n._getResponseMap(t))
					}, this._initializeServerMap(), this._initializeURL(t), this._initializeRequestData(t)
			}
			return En(e, [{
				key: "_initializeServerMap",
				value: function() {
					this._serverMap = Object.create(null);
					var e = "";
					for (var t in qh.NAME)
						if (Object.prototype.hasOwnProperty.call(qh.NAME, t)) switch (e = qh
							.NAME[t]) {
							case qh.NAME.PIC:
								this._serverMap[e] = qh.HOST.CURRENT.PIC;
								break;
							case qh.NAME.IM_COS_SIGN:
								this._serverMap[e] = qh.HOST.CURRENT.COS;
								break;
							default:
								this._serverMap[e] = qh.HOST.CURRENT.COMMON
						}
				}
			}, {
				key: "_getHost",
				value: function(e) {
					if (void 0 !== this._serverMap[e]) return this._serverMap[e];
					throw new Vp({
						code: Bp.NETWORK_UNDEFINED_SERVER_NAME,
						message: zf
					})
				}
			}, {
				key: "_initializeURL",
				value: function(e) {
					var t = e.serverName,
						n = e.cmd,
						r = this._getHost(t),
						o = "".concat(r, "/").concat(qh.NAME_VERSION[t], "/").concat(t, "/")
						.concat(n);
					o += "?".concat(this._getQueryString(e.queryString)), this.url = o
				}
			}, {
				key: "getUrl",
				value: function() {
					return this.url.replace(/&reqtime=(\d+)/, "&reqtime=".concat(Math.ceil(+
						new Date / 1e3)))
				}
			}, {
				key: "_initializeRequestData",
				value: function(e) {
					var t, n = e.requestData;
					t = this._requestDataCleaner(n), this.requestData = e.encode(t)
				}
			}, {
				key: "_requestDataCleaner",
				value: function(e) {
					var t = Array.isArray(e) ? [] : Object.create(null);
					for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && Ls(n) &&
						null !== e[n] && ("object" !== Mn(e[n]) ? t[n] = e[n] : t[n] = this
							._requestDataCleaner.bind(this)(e[n]));
					return t
				}
			}, {
				key: "_getQueryString",
				value: function(e) {
					var t = [];
					for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (
						"function" != typeof e[n] ? t.push("".concat(n, "=").concat(e[n])) :
						t.push("".concat(n, "=").concat(e[n]())));
					return t.join("&")
				}
			}, {
				key: "_getResponseMap",
				value: function(e) {
					if (e.keyMaps && e.keyMaps.response && Object.keys(e.keyMaps.response)
						.length > 0) return e.keyMaps.response
				}
			}]), e
		}(),
		Fd = [].slice,
		Vd = /MSIE .\./.test($e),
		Bd = function(e) {
			return function(t, n) {
				var r = arguments.length > 2,
					o = r ? Fd.call(arguments, 2) : void 0;
				return e(r ? function() {
					("function" == typeof t ? t : Function(t)).apply(this, o)
				} : t, n)
			}
		};

	function jd(e) {
		this.mixin(e)
	}
	Re({
		global: !0,
		bind: !0,
		forced: Vd
	}, {
		setTimeout: Bd(r.setTimeout),
		setInterval: Bd(r.setInterval)
	}), jd.mixin = function(e) {
		var t = e.prototype || e;
		t._isReady = !1, t.ready = function(e) {
			var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
			if (e) return this._isReady ? void(t ? e.call(this) : setTimeout(e, 1)) : (this
				._readyQueue = this._readyQueue || [], void this._readyQueue.push(e))
		}, t.triggerReady = function() {
			var e = this;
			this._isReady = !0, setTimeout((function() {
				var t = e._readyQueue;
				e._readyQueue = [], t && t.length > 0 && t.forEach((function(e) {
					e.call(this)
				}), e)
			}), 1)
		}, t.resetReady = function() {
			this._isReady = !1, this._readyQueue = []
		}, t.isReady = function() {
			return this._isReady
		}
	};
	var Kd = function() {
			function e(t) {
				In(this, e), jd.mixin(this), this.tim = t
			}
			return En(e, [{
				key: "isLoggedIn",
				value: function() {
					return this.tim.context.login === Xu.IS_LOGIN || !!this.tim.context.a2Key
				}
			}, {
				key: "createTransportCapsule",
				value: function(e) {
					var t = this.tim.packageConfig.get(e);
					return t ? new xd(t) : null
				}
			}, {
				key: "request",
				value: function(e) {
					var t = this.createTransportCapsule(e);
					return t || Ms.error("unknown transport capsule, please check!", e), this
						.tim.connectionController.request(t)
				}
			}, {
				key: "emitInnerEvent",
				value: function(e, t) {
					this.tim.innerEmitter.emit(e, t)
				}
			}, {
				key: "emitOuterEvent",
				value: function(e, t) {
					this.tim.outerEmitter.emit(e, t)
				}
			}, {
				key: "reset",
				value: function() {
					Ms.warn(["method: IMController.reset() method must be implemented"].join())
				}
			}, {
				key: "probeNetwork",
				value: function() {
					return this.tim.netMonitor.probe()
				}
			}, {
				key: "getNetworkType",
				value: function() {
					return this.tim.netMonitor.getNetworkType()
				}
			}, {
				key: "getPlatform",
				value: function() {
					return ja
				}
			}]), e
		}(),
		Hd = function() {
			function e(t, n) {
				In(this, e), this.data = t, this._innerEmitter = n, this.defaultData = {}, Object.assign(this
					.defaultData, t), this.initGetterAndSetter()
			}
			return En(e, [{
				key: "initGetterAndSetter",
				value: function() {
					var e = this,
						t = function(t) {
							Object.defineProperty(e, t, {
								enumerable: !0,
								configurable: !0,
								get: function() {
									return e.data[t]
								},
								set: function(n) {
									e.data[t] !== n && (e.data[t] = n, e.onChange
										.bind(e)(t, n))
								}
							})
						};
					for (var n in e.data) Object.prototype.hasOwnProperty.call(e.data, n) && t(
						n)
				}
			}, {
				key: "onChange",
				value: function(e, t) {
					this._innerEmitter.emit(Fh, {
						key: e,
						value: t
					})
				}
			}, {
				key: "reset",
				value: function() {
					for (var e in Ms.log("Context.reset"), this.data) Object.prototype
						.hasOwnProperty.call(this.data, e) && (this.data[e] = this.defaultData
							.hasOwnProperty(e) ? this.defaultData[e] : null)
				}
			}]), e
		}(),
		$d = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				In(this, n);
				var o = (r = t.call(this, e)).tim.loginInfo;
				return r._context = new Hd({
					login: Xu.IS_NOT_LOGIN,
					SDKAppID: o.SDKAppID,
					appIDAt3rd: null,
					accountType: o.accountType,
					identifier: o.identifier,
					tinyID: null,
					identifierNick: o.identifierNick,
					userSig: o.userSig,
					a2Key: null,
					contentType: "json",
					apn: 1,
					unlimitedAVChatRoom: o.unlimitedAVChatRoom,
					scene: o.scene,
					oversea: o.oversea,
					instanceID: o.instanceID
				}, r.tim.innerEmitter), r._initListener(), r
			}
			return En(n, [{
				key: "reset",
				value: function() {
					this._context.reset(), this.emitInnerEvent(Vh)
				}
			}, {
				key: "_initListener",
				value: function() {
					this.tim.innerEmitter.on(Fh, this._onContextMemberChange, this), this.tim
						.innerEmitter.on(_d, this._updateA2KeyAndTinyID, this)
				}
			}, {
				key: "_updateA2KeyAndTinyID",
				value: function(e) {
					var t = e.data,
						n = t.a2Key,
						r = t.tinyID;
					this._context.a2Key = n, this._context.tinyID = r, this.emitInnerEvent(Bh),
						this.triggerReady()
				}
			}, {
				key: "getContext",
				value: function() {
					return this._context
				}
			}, {
				key: "_onContextMemberChange",
				value: function(e) {
					var t = e.data,
						n = t.key,
						r = t.value;
					("tinyID" === n || "a2Key" === n) && (r.length <= 0 ? this._context.login =
						Xu.IS_NOT_LOGIN : this._context.login = null !== this._context.a2Key ?
						Xu.IS_LOGIN : Xu.IS_NOT_LOGIN)
				}
			}]), n
		}(Kd),
		zd = function e(t) {
			In(this, e), this.code = 0, this.data = t || {}
		},
		Wd = null,
		Yd = function(e) {
			Wd = e
		},
		Jd = function(e) {
			return e instanceof zd ? (Ms.warn("IMPromise.resolve 此函数会自动用options创建IMResponse实例，调用侧不需创建，建议修改！"),
				Promise.resolve(e)) : Promise.resolve(new zd(e))
		},
		Xd = function(e) {
			var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
			if (e instanceof Vp) return t && null !== Wd && Wd.emit(yn.ERROR, e), Promise.reject(e);
			if (e instanceof Error) {
				var n = new Vp({
					code: Bp.UNCAUGHT_ERROR,
					message: e.message
				});
				return t && null !== Wd && Wd.emit(yn.ERROR, n), Promise.reject(n)
			}
			if (ks(e) || ks(e.code) || ks(e.message)) Ms.error(
				"IMPromise.reject 必须指定code(错误码)和message(错误信息)!!!");
			else {
				if (Cs(e.code) && Es(e.message)) {
					var r = new Vp(e);
					return t && null !== Wd && Wd.emit(yn.ERROR, r), Promise.reject(r)
				}
				Ms.error("IMPromise.reject code(错误码)必须为数字，message(错误信息)必须为字符串!!!")
			}
		},
		Qd = "sdkReady",
		Zd = "login",
		eg = "longpolling",
		tg = "longpollingAV",
		ng = "sendMessage",
		rg = "sendMessageC2C",
		og = "sendMessageGroupWork",
		ig = "sendMessageGroupPublic",
		ag = "sendMessageGroupMeeting",
		sg = "sendMessageGroupAV",
		ug = "messageReceived",
		cg = "messageReceivedAV",
		lg = "initConversationList",
		pg = "initGroupList",
		fg = "upload",
		hg = function() {
			function e(t) {
				In(this, e), this.SDKAppID = "", this.version = "", this.tinyID = "", this.userID = "", this
					.platform = "", this.method = t, this.time = "", this.startts = Date.now(), this.endts = 0,
					this.timespan = 0, this.codeint = 0, this.message = "", this.text = "", this.msgType = "",
					this.networkType = "", this.platform = "", this.scene = "", this._sentFlag = !1, this
					.instanceID = "", this.host = function() {
						var e = "unknown";
						if (is && (e = "mac"), os && (e = "windows"), Ya && (e = "ios"), Ja && (e = "android"),
							Fa) try {
							var t = Ba.getSystemInfoSync().platform;
							void 0 !== t && (e = t)
						} catch (v_) {}
						return e
					}(), this.mpLibVersion = function() {
						if (Fa) try {
							var e;
							return void 0 === (e = xa ? my.getSystemInfoSync().version : Ba
								.getSystemInfoSync().SDKVersion) ? "-" : e
						} catch (v_) {
							return "-"
						}
						return "-"
					}()
			}
			return En(e, [{
				key: "setCommonInfo",
				value: function(e) {
					var t = e.SDKAppID,
						n = e.version,
						r = e.tinyID,
						o = e.userID,
						i = e.platform,
						a = e.scene,
						s = e.instanceID;
					this.SDKAppID = "".concat(t), this.version = "".concat(n), this.tinyID = r,
						this.userID = o, this.platform = i, this.scene = a, this.time = Us(),
						this.instanceID = s, this.startts && this.endts && !this.timespan && (
							this.timespan = Math.abs(this.endts - this.startts))
				}
			}, {
				key: "setEnd",
				value: function() {
					var e = this,
						t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
					this._sentFlag || (this.endts = Date.now(), t ? (this._sentFlag = !0, this
						._eventStatController.pushIn(this)) : setTimeout((function() {
						e._sentFlag = !0, e._eventStatController.pushIn(e)
					}), 0))
				}
			}, {
				key: "setError",
				value: function(e, t, n) {
					return e instanceof Error ? (this._sentFlag || (this.setNetworkType(n), t ?
						(e.code && this.setCode(e.code), e.message && this.setMessage(e
							.message)) : (this.setCode(Bp.NO_NETWORK), this.setMessage(
							Yf))), this) : (Ms.warn(
							"SSOLogData.setError value not instanceof Error, please check!"
							), this)
				}
			}, {
				key: "setCode",
				value: function(e) {
					return ks(e) || this._sentFlag || ("ECONNABORTED" === e && (this.codeint =
						103), Cs(e) ? this.codeint = e : Ms.warn(
						"SSOLogData.setCode value not a number, please check!", e, Mn(e)
						)), this
				}
			}, {
				key: "setMessage",
				value: function(e) {
					return ks(e) || this._sentFlag ? this : Es(e) ? (this.message = e, this) :
						this
				}
			}, {
				key: "setText",
				value: function(e) {
					return Cs(e) ? this.text = e.toString() : Es(e) && (this.text = e), this
				}
			}, {
				key: "setMessageType",
				value: function(e) {
					return this.msgType = e, this
				}
			}, {
				key: "setNetworkType",
				value: function(e) {
					return ks(e) ? Ms.warn(
							"SSOLogData.setNetworkType value is undefined, please check!") :
						this.networkType = e, this
				}
			}], [{
				key: "bindController",
				value: function(t) {
					e.prototype._eventStatController = t
				}
			}]), e
		}(),
		dg = "sdkConstruct",
		gg = "sdkReady",
		mg = "accessLayer",
		vg = "login",
		yg = "logout",
		_g = "kickedOut",
		Mg = "registerPlugin",
		Ig = "getCosAuthKey",
		Cg = "getCosPreSigUrl",
		Eg = "upload",
		Sg = "sendMessage",
		Tg = "sendComboMessage",
		Dg = "getC2CRoamingMessages",
		kg = "getGroupRoamingMessages",
		Ag = "revokeMessage",
		Og = "setC2CMessageRead",
		Rg = "setGroupMessageRead",
		Ng = "emptyMessageBody",
		Lg = "getPeerReadTime",
		wg = "uploadMergerMessage",
		bg = "downloadMergerMessage",
		Pg = "getConversationList",
		Gg = "getConversationProfile",
		Ug = "deleteConversation",
		qg = "getConversationListInStorage",
		xg = "syncConversationList",
		Fg = "createGroup",
		Vg = "applyJoinGroup",
		Bg = "joinAVChatRoomSilently",
		jg = "quitGroup",
		Kg = "searchGroupByID",
		Hg = "changeGroupOwner",
		$g = "handleGroupApplication",
		zg = "setMessageRemindType",
		Wg = "dismissGroup",
		Yg = "updateGroupProfile",
		Jg = "getGroupList",
		Xg = "getGroupProfile",
		Qg = "getGroupListInStorage",
		Zg = "getGroupLastSequence",
		em = "getGroupMemberList",
		tm = "getGroupMemberProfile",
		nm = "addGroupMember",
		rm = "deleteGroupMember",
		om = "setGroupMemberMuteTime",
		im = "setGroupMemberNameCard",
		am = "setGroupMemberRole",
		sm = "setGroupMemberCustomField",
		um = "getGroupOnlineMemberCount",
		cm = "getLongPollID",
		lm = "longPollingError",
		pm = "networkJitter",
		fm = "sdkReload",
		hm = "messageLoss",
		dm = "messageStacked",
		gm = "getUserProfile",
		mm = "updateMyProfile",
		vm = "getBlacklist",
		ym = "addToBlacklist",
		_m = "removeFromBlacklist",
		Mm = "mpHideToShow",
		Im = "callbackFunctionError",
		Cm = "exceptionError",
		Em = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), !0 === (r = t.call(this, e)).tim.context.oversea && qh.HOST.setCurrent(Uh),
					r._initializeListener(), r
			}
			return En(n, [{
				key: "login",
				value: function(e) {
					if (this.isLoggedIn()) {
						var t = "您已经登录账号".concat(e.identifier,
							"！如需切换账号登录，请先调用 logout 接口登出，再调用 login 接口登录。");
						return Ms.warn(t), Jd({
							actionStatus: "OK",
							errorCode: 0,
							errorInfo: t,
							repeatLogin: !0
						})
					}
					Ms.log("SignController.login userID=".concat(e.identifier)), Ms.time(Zd);
					var n = this._checkLoginInfo(e);
					return ou(n) ? (this.tim.context.identifier = e.identifier, this.tim.context
						.userSig = e.userSig, this.tim.context.identifier && this.tim
						.context.userSig ? this._accessLayer() : void 0) : Xd(n)
				}
			}, {
				key: "_isLoginCurrentUser",
				value: function(e) {
					return this.tim.context.identifier === e
				}
			}, {
				key: "_initializeListener",
				value: function() {
					var e = this.tim.innerEmitter;
					e.on(nd, this._onMultipleAccountKickedOut, this), e.on(rd, this
						._onMultipleDeviceKickedOut, this), e.on(Cd, this._onUserSigExpired,
						this)
				}
			}, {
				key: "_accessLayer",
				value: function() {
					var e = this,
						t = new hg(mg);
					return Ms.log("SignController._accessLayer."), this.request({
						name: "accessLayer",
						action: "query"
					}).then((function(n) {
						return t.setNetworkType(e.getNetworkType()).setText(n.data
								.webImAccessLayer).setEnd(), Ms.log(
								"SignController._accessLayer ok. webImAccessLayer="
								.concat(n.data.webImAccessLayer)), e.tim.context
							.oversea || n.data.webImAccessLayer !== bh || qh.HOST
							.setCurrent(n.data.webImAccessLayer), e._login()
					})).catch((function(n) {
						return e.probeNetwork().then((function(r) {
								var o = Un(r, 2),
									i = o[0],
									a = o[1];
								t.setError(n, i, a).setEnd(!0), e.tim
									.eventStatController.reportAtOnce()
							})), Ms.error(
								"SignController._accessLayer failed. error:", n),
							Xd(n)
					}))
				}
			}, {
				key: "_login",
				value: function() {
					var e = this,
						t = new hg(vg);
					return this.request({
						name: "login",
						action: "query"
					}).then((function(n) {
						var r = null;
						if (!n.data.tinyID) throw r = new Vp({
								code: Bp.NO_TINYID,
								message: zp
							}), t.setError(r, !0, e.getNetworkType()).setEnd(),
							r;
						if (!n.data.a2Key) throw r = new Vp({
								code: Bp.NO_A2KEY,
								message: Wp
							}), t.setError(r, !0, e.getNetworkType()).setEnd(),
							r;
						return t.setNetworkType(e.getNetworkType()).setText(""
								.concat(e.tim.loginInfo.identifier)).setEnd(), Ms
							.log("SignController.login ok. userID=".concat(e.tim
								.loginInfo.identifier, " loginCost=").concat(Ms
								.timeEnd(Zd), "ms")), e.emitInnerEvent(_d, {
								a2Key: n.data.a2Key,
								tinyID: n.data.tinyID
							}), Jd(n.data)
					})).catch((function(n) {
						return e.probeNetwork().then((function(e) {
								var r = Un(e, 2),
									o = r[0],
									i = r[1];
								t.setError(n, o, i).setEnd(!0)
							})), Ms.error("SignController.login failed. error:", n),
							Xd(n)
					}))
				}
			}, {
				key: "logout",
				value: function() {
					return this.isLoggedIn() ? (new hg(yg).setNetworkType(this.getNetworkType())
						.setText("userID=".concat(this.tim.loginInfo.identifier, " type=")
							.concat("longPollLogout")).setEnd(!0), Ms.info(
							"SignController.logout"), this.emitInnerEvent(Md), this._logout(
							_p).then(this._emitLogoutSuccess.bind(this)).catch(this
							._emitLogoutSuccess.bind(this))) : Xd({
						code: Bp.USER_NOT_LOGGED_IN,
						message: Yp
					})
				}
			}, {
				key: "_logout",
				value: function(e) {
					var t = this.tim.notificationController,
						n = e === yp ? "logout" : "longPollLogout",
						r = e === yp ? {
							name: n,
							action: "query"
						} : {
							name: n,
							action: "query",
							param: {
								longPollID: t.getLongPollID()
							}
						};
					return this.request(r).catch((function(e) {
						return Ms.error("SignController._logout error:", e), Xd(e)
					}))
				}
			}, {
				key: "_checkLoginInfo",
				value: function(e) {
					var t = 0,
						n = "";
					return null === e.SDKAppID ? (t = Bp.NO_SDKAPPID, n = jp) : null === e
						.accountType ? (t = Bp.NO_ACCOUNT_TYPE, n = Kp) : null === e
						.identifier ? (t = Bp.NO_IDENTIFIER, n = Hp) : null === e.userSig && (
							t = Bp.NO_USERSIG, n = $p), ou(t) || ou(n) ? {} : {
							code: t,
							message: n
						}
				}
			}, {
				key: "_emitLogoutSuccess",
				value: function() {
					return this.emitInnerEvent(Id), Jd({})
				}
			}, {
				key: "_onMultipleAccountKickedOut",
				value: function() {
					var e = this;
					new hg(_g).setNetworkType(this.getNetworkType()).setText(_n
						.KICKED_OUT_MULT_ACCOUNT).setEnd(!0), Ms.warn(
						"SignController._onMultipleAccountKickedOut kicked out. userID="
						.concat(this.tim.loginInfo.identifier)), this.tim.logout().then((
						function() {
							e.emitOuterEvent(yn.KICKED_OUT, {
								type: _n.KICKED_OUT_MULT_ACCOUNT
							})
						}))
				}
			}, {
				key: "_onMultipleDeviceKickedOut",
				value: function() {
					var e = this;
					new hg(_g).setNetworkType(this.getNetworkType()).setText(_n
						.KICKED_OUT_MULT_DEVICE).setEnd(!0), Ms.warn(
						"SignController._onMultipleDeviceKickedOut kicked out. userID="
						.concat(this.tim.loginInfo.identifier)), this.tim.logout().then((
						function() {
							e.emitOuterEvent(yn.KICKED_OUT, {
								type: _n.KICKED_OUT_MULT_DEVICE
							})
						}))
				}
			}, {
				key: "_onUserSigExpired",
				value: function() {
					new hg(_g).setNetworkType(this.getNetworkType()).setText(_n
							.KICKED_OUT_USERSIG_EXPIRED).setEnd(!0), Ms.warn(
							"SignController._onUserSigExpired: userSig 签名过期被踢下线"), this
						.emitOuterEvent(yn.KICKED_OUT, {
							type: _n.KICKED_OUT_USERSIG_EXPIRED
						}), this.tim.resetSDK()
				}
			}, {
				key: "reset",
				value: function() {
					Ms.info("SignController.reset")
				}
			}]), n
		}(Kd),
		Sm = function(e, t) {
			return function() {
				for (var n = new Array(arguments.length), r = 0; r < n.length; r++) n[r] = arguments[r];
				return e.apply(t, n)
			}
		},
		Tm = Object.prototype.toString;

	function Dm(e) {
		return "[object Array]" === Tm.call(e)
	}

	function km(e) {
		return void 0 === e
	}

	function Am(e) {
		return null !== e && "object" == typeof e
	}

	function Om(e) {
		return "[object Function]" === Tm.call(e)
	}

	function Rm(e, t) {
		if (null != e)
			if ("object" != typeof e && (e = [e]), Dm(e))
				for (var n = 0, r = e.length; n < r; n++) t.call(null, e[n], n, e);
			else
				for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.call(null, e[o], o, e)
	}
	var Nm = {
		isArray: Dm,
		isArrayBuffer: function(e) {
			return "[object ArrayBuffer]" === Tm.call(e)
		},
		isBuffer: function(e) {
			return null !== e && !km(e) && null !== e.constructor && !km(e.constructor) && "function" ==
				typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
		},
		isFormData: function(e) {
			return "undefined" != typeof FormData && e instanceof FormData
		},
		isArrayBufferView: function(e) {
			return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) :
				e && e.buffer && e.buffer instanceof ArrayBuffer
		},
		isString: function(e) {
			return "string" == typeof e
		},
		isNumber: function(e) {
			return "number" == typeof e
		},
		isObject: Am,
		isUndefined: km,
		isDate: function(e) {
			return "[object Date]" === Tm.call(e)
		},
		isFile: function(e) {
			return "[object File]" === Tm.call(e)
		},
		isBlob: function(e) {
			return "[object Blob]" === Tm.call(e)
		},
		isFunction: Om,
		isStream: function(e) {
			return Am(e) && Om(e.pipe)
		},
		isURLSearchParams: function(e) {
			return "undefined" != typeof URLSearchParams && e instanceof URLSearchParams
		},
		isStandardBrowserEnv: function() {
			return ("undefined" == typeof navigator || "ReactNative" !== navigator.product &&
				"NativeScript" !== navigator.product && "NS" !== navigator.product) && (
				"undefined" != typeof window && "undefined" != typeof document)
		},
		forEach: Rm,
		merge: function e() {
			var t = {};

			function n(n, r) {
				"object" == typeof t[r] && "object" == typeof n ? t[r] = e(t[r], n) : t[r] = n
			}
			for (var r = 0, o = arguments.length; r < o; r++) Rm(arguments[r], n);
			return t
		},
		deepMerge: function e() {
			var t = {};

			function n(n, r) {
				"object" == typeof t[r] && "object" == typeof n ? t[r] = e(t[r], n) : t[r] = "object" ==
					typeof n ? e({}, n) : n
			}
			for (var r = 0, o = arguments.length; r < o; r++) Rm(arguments[r], n);
			return t
		},
		extend: function(e, t, n) {
			return Rm(t, (function(t, r) {
				e[r] = n && "function" == typeof t ? Sm(t, n) : t
			})), e
		},
		trim: function(e) {
			return e.replace(/^\s*/, "").replace(/\s*$/, "")
		}
	};

	function Lm(e) {
		return encodeURIComponent(e).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(
			/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]")
	}
	var wm = function(e, t, n) {
		if (!t) return e;
		var r;
		if (n) r = n(t);
		else if (Nm.isURLSearchParams(t)) r = t.toString();
		else {
			var o = [];
			Nm.forEach(t, (function(e, t) {
				null != e && (Nm.isArray(e) ? t += "[]" : e = [e], Nm.forEach(e, (function(e) {
					Nm.isDate(e) ? e = e.toISOString() : Nm.isObject(e) && (e =
						JSON.stringify(e)), o.push(Lm(t) + "=" + Lm(e))
				})))
			})), r = o.join("&")
		}
		if (r) {
			var i = e.indexOf("#"); - 1 !== i && (e = e.slice(0, i)), e += (-1 === e.indexOf("?") ? "?" :
				"&") + r
		}
		return e
	};

	function bm() {
		this.handlers = []
	}
	bm.prototype.use = function(e, t) {
		return this.handlers.push({
			fulfilled: e,
			rejected: t
		}), this.handlers.length - 1
	}, bm.prototype.eject = function(e) {
		this.handlers[e] && (this.handlers[e] = null)
	}, bm.prototype.forEach = function(e) {
		Nm.forEach(this.handlers, (function(t) {
			null !== t && e(t)
		}))
	};
	var Pm = bm,
		Gm = function(e, t, n) {
			return Nm.forEach(n, (function(n) {
				e = n(e, t)
			})), e
		},
		Um = function(e) {
			return !(!e || !e.__CANCEL__)
		};

	function qm() {
		throw new Error("setTimeout has not been defined")
	}

	function xm() {
		throw new Error("clearTimeout has not been defined")
	}
	var Fm = qm,
		Vm = xm;

	function Bm(e) {
		if (Fm === setTimeout) return setTimeout(e, 0);
		if ((Fm === qm || !Fm) && setTimeout) return Fm = setTimeout, setTimeout(e, 0);
		try {
			return Fm(e, 0)
		} catch (t) {
			try {
				return Fm.call(null, e, 0)
			} catch (t) {
				return Fm.call(this, e, 0)
			}
		}
	}
	"function" == typeof fs.setTimeout && (Fm = setTimeout), "function" == typeof fs.clearTimeout && (Vm =
		clearTimeout);
	var jm, Km = [],
		Hm = !1,
		$m = -1;

	function zm() {
		Hm && jm && (Hm = !1, jm.length ? Km = jm.concat(Km) : $m = -1, Km.length && Wm())
	}

	function Wm() {
		if (!Hm) {
			var e = Bm(zm);
			Hm = !0;
			for (var t = Km.length; t;) {
				for (jm = Km, Km = []; ++$m < t;) jm && jm[$m].run();
				$m = -1, t = Km.length
			}
			jm = null, Hm = !1,
				function(e) {
					if (Vm === clearTimeout) return clearTimeout(e);
					if ((Vm === xm || !Vm) && clearTimeout) return Vm = clearTimeout, clearTimeout(e);
					try {
						Vm(e)
					} catch (t) {
						try {
							return Vm.call(null, e)
						} catch (t) {
							return Vm.call(this, e)
						}
					}
				}(e)
		}
	}

	function Ym(e, t) {
		this.fun = e, this.array = t
	}
	Ym.prototype.run = function() {
		this.fun.apply(null, this.array)
	};

	function Jm() {}
	var Xm = Jm,
		Qm = Jm,
		Zm = Jm,
		ev = Jm,
		tv = Jm,
		nv = Jm,
		rv = Jm;
	var ov = fs.performance || {},
		iv = ov.now || ov.mozNow || ov.msNow || ov.oNow || ov.webkitNow || function() {
			return (new Date).getTime()
		};
	var av = new Date;
	var sv = {
			nextTick: function(e) {
				var t = new Array(arguments.length - 1);
				if (arguments.length > 1)
					for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
				Km.push(new Ym(e, t)), 1 !== Km.length || Hm || Bm(Wm)
			},
			title: "browser",
			browser: !0,
			env: {},
			argv: [],
			version: "",
			versions: {},
			on: Xm,
			addListener: Qm,
			once: Zm,
			off: ev,
			removeListener: tv,
			removeAllListeners: nv,
			emit: rv,
			binding: function(e) {
				throw new Error("process.binding is not supported")
			},
			cwd: function() {
				return "/"
			},
			chdir: function(e) {
				throw new Error("process.chdir is not supported")
			},
			umask: function() {
				return 0
			},
			hrtime: function(e) {
				var t = .001 * iv.call(ov),
					n = Math.floor(t),
					r = Math.floor(t % 1 * 1e9);
				return e && (n -= e[0], (r -= e[1]) < 0 && (n--, r += 1e9)), [n, r]
			},
			platform: "browser",
			release: {},
			config: {},
			uptime: function() {
				return (new Date - av) / 1e3
			}
		},
		uv = function(e, t) {
			Nm.forEach(e, (function(n, r) {
				r !== t && r.toUpperCase() === t.toUpperCase() && (e[t] = n, delete e[r])
			}))
		},
		cv = function(e, t, n, r, o) {
			return function(e, t, n, r, o) {
				return e.config = t, n && (e.code = n), e.request = r, e.response = o, e.isAxiosError = !0,
					e.toJSON = function() {
						return {
							message: this.message,
							name: this.name,
							description: this.description,
							number: this.number,
							fileName: this.fileName,
							lineNumber: this.lineNumber,
							columnNumber: this.columnNumber,
							stack: this.stack,
							config: this.config,
							code: this.code
						}
					}, e
			}(new Error(e), t, n, r, o)
		},
		lv = ["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host",
			"if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards",
			"proxy-authorization", "referer", "retry-after", "user-agent"
		],
		pv = Nm.isStandardBrowserEnv() ? function() {
			var e, t = /(msie|trident)/i.test(navigator.userAgent),
				n = document.createElement("a");

			function r(e) {
				var r = e;
				return t && (n.setAttribute("href", r), r = n.href), n.setAttribute("href", r), {
					href: n.href,
					protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
					host: n.host,
					search: n.search ? n.search.replace(/^\?/, "") : "",
					hash: n.hash ? n.hash.replace(/^#/, "") : "",
					hostname: n.hostname,
					port: n.port,
					pathname: "/" === n.pathname.charAt(0) ? n.pathname : "/" + n.pathname
				}
			}
			return e = r(window.location.href),
				function(t) {
					var n = Nm.isString(t) ? r(t) : t;
					return n.protocol === e.protocol && n.host === e.host
				}
		}() : function() {
			return !0
		},
		fv = Nm.isStandardBrowserEnv() ? {
			write: function(e, t, n, r, o, i) {
				var a = [];
				a.push(e + "=" + encodeURIComponent(t)), Nm.isNumber(n) && a.push("expires=" + new Date(n)
					.toGMTString()), Nm.isString(r) && a.push("path=" + r), Nm.isString(o) && a.push(
					"domain=" + o), !0 === i && a.push("secure"), document.cookie = a.join("; ")
			},
			read: function(e) {
				var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
				return t ? decodeURIComponent(t[3]) : null
			},
			remove: function(e) {
				this.write(e, "", Date.now() - 864e5)
			}
		} : {
			write: function() {},
			read: function() {
				return null
			},
			remove: function() {}
		},
		hv = function(e) {
			return new Promise((function(t, n) {
				var r = e.data,
					o = e.headers;
				Nm.isFormData(r) && delete o["Content-Type"];
				var i = new XMLHttpRequest;
				if (e.auth) {
					var a = e.auth.username || "",
						s = e.auth.password || "";
					o.Authorization = "Basic " + btoa(a + ":" + s)
				}
				var u, c, l = (u = e.baseURL, c = e.url, u && !/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(
					c) ? function(e, t) {
					return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e
				}(u, c) : c);
				if (i.open(e.method.toUpperCase(), wm(l, e.params, e.paramsSerializer), !0), i
					.timeout = e.timeout, i.onreadystatechange = function() {
						if (i && 4 === i.readyState && (0 !== i.status || i.responseURL && 0 === i
								.responseURL.indexOf("file:"))) {
							var r = "getAllResponseHeaders" in i ? function(e) {
									var t, n, r, o = {};
									return e ? (Nm.forEach(e.split("\n"), (function(e) {
										if (r = e.indexOf(":"), t = Nm.trim(e
												.substr(0, r)).toLowerCase(), n = Nm
											.trim(e.substr(r + 1)), t) {
											if (o[t] && lv.indexOf(t) >= 0) return;
											o[t] = "set-cookie" === t ? (o[t] ? o[
												t] : []).concat([n]) : o[t] ? o[
												t] + ", " + n : n
										}
									})), o) : o
								}(i.getAllResponseHeaders()) : null,
								o = {
									data: e.responseType && "text" !== e.responseType ? i.response :
										i.responseText,
									status: i.status,
									statusText: i.statusText,
									headers: r,
									config: e,
									request: i
								};
							! function(e, t, n) {
								var r = n.config.validateStatus;
								!r || r(n.status) ? e(n) : t(cv("Request failed with status code " +
									n.status, n.config, null, n.request, n))
							}(t, n, o), i = null
						}
					}, i.onabort = function() {
						i && (n(cv("Request aborted", e, "ECONNABORTED", i)), i = null)
					}, i.onerror = function() {
						n(cv("Network Error", e, null, i)), i = null
					}, i.ontimeout = function() {
						var t = "timeout of " + e.timeout + "ms exceeded";
						e.timeoutErrorMessage && (t = e.timeoutErrorMessage), n(cv(t, e,
							"ECONNABORTED", i)), i = null
					}, Nm.isStandardBrowserEnv()) {
					var p = fv,
						f = (e.withCredentials || pv(l)) && e.xsrfCookieName ? p.read(e
							.xsrfCookieName) : void 0;
					f && (o[e.xsrfHeaderName] = f)
				}
				if ("setRequestHeader" in i && Nm.forEach(o, (function(e, t) {
						void 0 === r && "content-type" === t.toLowerCase() ? delete o[t] : i
							.setRequestHeader(t, e)
					})), Nm.isUndefined(e.withCredentials) || (i.withCredentials = !!e
						.withCredentials), e.responseType) try {
					i.responseType = e.responseType
				} catch (h) {
					if ("json" !== e.responseType) throw h
				}
				"function" == typeof e.onDownloadProgress && i.addEventListener("progress", e
						.onDownloadProgress), "function" == typeof e.onUploadProgress && i.upload &&
					i.upload.addEventListener("progress", e.onUploadProgress), e.cancelToken && e
					.cancelToken.promise.then((function(e) {
						i && (i.abort(), n(e), i = null)
					})), void 0 === r && (r = null), i.send(r)
			}))
		},
		dv = {
			"Content-Type": "application/x-www-form-urlencoded"
		};

	function gv(e, t) {
		!Nm.isUndefined(e) && Nm.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t)
	}
	var mv, vv = {
		adapter: (("undefined" != typeof XMLHttpRequest || void 0 !== sv && "[object process]" === Object
			.prototype.toString.call(sv)) && (mv = hv), mv),
		transformRequest: [function(e, t) {
			return uv(t, "Accept"), uv(t, "Content-Type"), Nm.isFormData(e) || Nm.isArrayBuffer(
				e) || Nm.isBuffer(e) || Nm.isStream(e) || Nm.isFile(e) || Nm.isBlob(e) ? e : Nm
				.isArrayBufferView(e) ? e.buffer : Nm.isURLSearchParams(e) ? (gv(t,
					"application/x-www-form-urlencoded;charset=utf-8"), e.toString()) : Nm.isObject(
					e) ? (gv(t, "application/json;charset=utf-8"), JSON.stringify(e)) : e
		}],
		transformResponse: [function(e) {
			if ("string" == typeof e) try {
				e = JSON.parse(e)
			} catch (t) {}
			return e
		}],
		timeout: 0,
		xsrfCookieName: "XSRF-TOKEN",
		xsrfHeaderName: "X-XSRF-TOKEN",
		maxContentLength: -1,
		validateStatus: function(e) {
			return e >= 200 && e < 300
		}
	};
	vv.headers = {
		common: {
			Accept: "application/json, text/plain, */*"
		}
	}, Nm.forEach(["delete", "get", "head"], (function(e) {
		vv.headers[e] = {}
	})), Nm.forEach(["post", "put", "patch"], (function(e) {
		vv.headers[e] = Nm.merge(dv)
	}));
	var yv = vv;

	function _v(e) {
		e.cancelToken && e.cancelToken.throwIfRequested()
	}
	var Mv = function(e) {
			return _v(e), e.headers = e.headers || {}, e.data = Gm(e.data, e.headers, e.transformRequest), e
				.headers = Nm.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers), Nm.forEach([
					"delete", "get", "head", "post", "put", "patch", "common"
				], (function(t) {
					delete e.headers[t]
				})), (e.adapter || yv.adapter)(e).then((function(t) {
					return _v(e), t.data = Gm(t.data, t.headers, e.transformResponse), t
				}), (function(t) {
					return Um(t) || (_v(e), t && t.response && (t.response.data = Gm(t.response.data, t
						.response.headers, e.transformResponse))), Promise.reject(t)
				}))
		},
		Iv = function(e, t) {
			t = t || {};
			var n = {},
				r = ["url", "method", "params", "data"],
				o = ["headers", "auth", "proxy"],
				i = ["baseURL", "url", "transformRequest", "transformResponse", "paramsSerializer", "timeout",
					"withCredentials", "adapter", "responseType", "xsrfCookieName", "xsrfHeaderName",
					"onUploadProgress", "onDownloadProgress", "maxContentLength", "validateStatus",
					"maxRedirects", "httpAgent", "httpsAgent", "cancelToken", "socketPath"
				];
			Nm.forEach(r, (function(e) {
				void 0 !== t[e] && (n[e] = t[e])
			})), Nm.forEach(o, (function(r) {
				Nm.isObject(t[r]) ? n[r] = Nm.deepMerge(e[r], t[r]) : void 0 !== t[r] ? n[r] = t[
					r] : Nm.isObject(e[r]) ? n[r] = Nm.deepMerge(e[r]) : void 0 !== e[r] && (n[r] =
						e[r])
			})), Nm.forEach(i, (function(r) {
				void 0 !== t[r] ? n[r] = t[r] : void 0 !== e[r] && (n[r] = e[r])
			}));
			var a = r.concat(o).concat(i),
				s = Object.keys(t).filter((function(e) {
					return -1 === a.indexOf(e)
				}));
			return Nm.forEach(s, (function(r) {
				void 0 !== t[r] ? n[r] = t[r] : void 0 !== e[r] && (n[r] = e[r])
			})), n
		};

	function Cv(e) {
		this.defaults = e, this.interceptors = {
			request: new Pm,
			response: new Pm
		}
	}
	Cv.prototype.request = function(e) {
		"string" == typeof e ? (e = arguments[1] || {}).url = arguments[0] : e = e || {}, (e = Iv(this
				.defaults, e)).method ? e.method = e.method.toLowerCase() : this.defaults.method ? e
			.method = this.defaults.method.toLowerCase() : e.method = "get";
		var t = [Mv, void 0],
			n = Promise.resolve(e);
		for (this.interceptors.request.forEach((function(e) {
				t.unshift(e.fulfilled, e.rejected)
			})), this.interceptors.response.forEach((function(e) {
				t.push(e.fulfilled, e.rejected)
			})); t.length;) n = n.then(t.shift(), t.shift());
		return n
	}, Cv.prototype.getUri = function(e) {
		return e = Iv(this.defaults, e), wm(e.url, e.params, e.paramsSerializer).replace(/^\?/, "")
	}, Nm.forEach(["delete", "get", "head", "options"], (function(e) {
		Cv.prototype[e] = function(t, n) {
			return this.request(Nm.merge(n || {}, {
				method: e,
				url: t
			}))
		}
	})), Nm.forEach(["post", "put", "patch"], (function(e) {
		Cv.prototype[e] = function(t, n, r) {
			return this.request(Nm.merge(r || {}, {
				method: e,
				url: t,
				data: n
			}))
		}
	}));
	var Ev = Cv;

	function Sv(e) {
		this.message = e
	}
	Sv.prototype.toString = function() {
		return "Cancel" + (this.message ? ": " + this.message : "")
	}, Sv.prototype.__CANCEL__ = !0;
	var Tv = Sv;

	function Dv(e) {
		if ("function" != typeof e) throw new TypeError("executor must be a function.");
		var t;
		this.promise = new Promise((function(e) {
			t = e
		}));
		var n = this;
		e((function(e) {
			n.reason || (n.reason = new Tv(e), t(n.reason))
		}))
	}
	Dv.prototype.throwIfRequested = function() {
		if (this.reason) throw this.reason
	}, Dv.source = function() {
		var e;
		return {
			token: new Dv((function(t) {
				e = t
			})),
			cancel: e
		}
	};
	var kv = Dv;

	function Av(e) {
		var t = new Ev(e),
			n = Sm(Ev.prototype.request, t);
		return Nm.extend(n, Ev.prototype, t), Nm.extend(n, t), n
	}
	var Ov = Av(yv);
	Ov.Axios = Ev, Ov.create = function(e) {
		return Av(Iv(Ov.defaults, e))
	}, Ov.Cancel = Tv, Ov.CancelToken = kv, Ov.isCancel = Um, Ov.all = function(e) {
		return Promise.all(e)
	}, Ov.spread = function(e) {
		return function(t) {
			return e.apply(null, t)
		}
	};
	var Rv = Ov,
		Nv = Ov;
	Rv.default = Nv;
	var Lv = Rv,
		wv = Lv.create({
			timeout: 3e4,
			headers: {
				"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
			}
		});
	wv.interceptors.response.use((function(e) {
		var t = e.data,
			n = t.error_code,
			r = t.ErrorCode;
		return Cs(n) && (r = n), r !== Ju.SUCCESS && (e.data.ErrorCode = Number(r)), e
	}), (function(e) {
		return "Network Error" === e.message && (!0 === wv.defaults.withCredentials && Ms.warn(
			"Network Error, try to close `IMAxios.defaults.withCredentials` to false. (IMAxios.js)"
			), wv.defaults.withCredentials = !1), Promise.reject(e)
	}));
	var bv = function() {
			function e() {
				In(this, e)
			}
			return En(e, [{
				key: "request",
				value: function(e) {
					console.warn("请注意： ConnectionBase.request() 方法必须被派生类重写:")
				}
			}, {
				key: "_checkOptions",
				value: function(e) {
					if (!1 == !!e.url) throw new Vp({
						code: Bp.NETWORK_BASE_OPTIONS_NO_URL,
						message: $f
					})
				}
			}, {
				key: "_initOptions",
				value: function(e) {
					e.method = ["POST", "GET", "PUT", "DELETE", "OPTION"].indexOf(e.method) >=
						0 ? e.method : "POST", e.dataType = e.dataType || "json", e
						.responseType = e.responseType || "json"
				}
			}]), e
		}(),
		Pv = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n() {
				var e;
				return In(this, n), (e = t.call(this)).retry = 2, e
			}
			return En(n, [{
				key: "request",
				value: function(e) {
					return this._checkOptions(e), this._initOptions(e), this._requestWithRetry({
						url: e.url,
						data: e.data,
						method: e.method
					})
				}
			}, {
				key: "_requestWithRetry",
				value: function(e) {
					var t = this,
						n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
					return wv(e).catch((function(r) {
						return t.retry && n < t.retry ? t._requestWithRetry(e, ++
							n) : Xd(new Vp({
								code: r.code || "",
								message: r.message || ""
							}))
					}))
				}
			}]), n
		}(bv),
		Gv = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n() {
				var e;
				return In(this, n), (e = t.call(this)).retry = 2, e._request = e.promisify(Ba.request), e
			}
			return En(n, [{
				key: "request",
				value: function(e) {
					return this._checkOptions(e), this._initOptions(e), e = Dn(Dn({}, e), {}, {
						responseType: "text"
					}), this._requestWithRetry(e)
				}
			}, {
				key: "_requestWithRetry",
				value: function(e) {
					var t = this,
						n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
					return this._request(e).then(this._handleResolve).catch((function(r) {
						if (Es(r.errMsg)) {
							if (r.errMsg.includes("abort")) return Jd({});
							if (r.errMsg.includes("timeout")) return t.retry > 0 &&
								n < t.retry ? t._requestWithRetry(e, ++n) : Xd(
									new Vp({
										code: Bp.NETWORK_TIMEOUT,
										message: r.errMsg
									}));
							if (r.errMsg.includes("fail")) return t.retry > 0 && n <
								t.retry ? t._requestWithRetry(e, ++n) : Xd(
									new Vp({
										code: Bp.NETWORK_ERROR,
										message: r.errMsg
									}))
						}
						return Xd(new Vp(Dn({
							code: Bp.UNCAUGHT_ERROR,
							message: r.message
						}, r)))
					}))
				}
			}, {
				key: "_handleResolve",
				value: function(e) {
					var t = e.data,
						n = t.error_code,
						r = t.ErrorCode;
					return Cs(n) && (r = n), r !== Ju.SUCCESS && (e.data.ErrorCode = Number(""
						.concat(r))), e
				}
			}, {
				key: "promisify",
				value: function(e) {
					return function(t) {
						return new Promise((function(n, r) {
							var o = e(Object.assign({}, t, {
								success: n,
								fail: r
							}));
							t.updateAbort && t.updateAbort((function() {
								o && Os(o.abort) && o.abort()
							}))
						}))
					}
				}
			}]), n
		}(bv),
		Uv = function() {
			function e() {
				In(this, e), this.request = 0, this.success = 0, this.fail = 0, this.reportRate = 10, this
					.requestTimeCost = []
			}
			return En(e, [{
				key: "report",
				value: function() {
					if (1 !== this.request) {
						if (this.request % this.reportRate != 0) return null;
						var e = this.avgRequestTime(),
							t = "runLoop reports: success=".concat(this.success, ",fail=")
							.concat(this.fail, ",total=").concat(this.request, ",avg=").concat(
								e, ",cur=").concat(this.requestTimeCost[this.requestTimeCost
								.length - 1], ",max=").concat(Math.max.apply(null, this
								.requestTimeCost), ",min=").concat(Math.min.apply(null, this
								.requestTimeCost));
						Ms.log(t)
					}
				}
			}, {
				key: "setRequestTime",
				value: function(e, t) {
					var n = Math.abs(t - e);
					100 === this.requestTimeCost.length && this.requestTimeCost.shift(), this
						.requestTimeCost.push(n)
				}
			}, {
				key: "avgRequestTime",
				value: function() {
					for (var e, t = this.requestTimeCost.length, n = 0, r = 0; r < t; r++) n +=
						this.requestTimeCost[r];
					return e = n / t, Math.round(100 * e) / 100
				}
			}]), e
		}(),
		qv = Lv.create({
			timeout: 6e3,
			headers: {
				"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
			}
		});
	qv.interceptors.response.use((function(e) {
		var t = e.data,
			n = t.error_code,
			r = t.ErrorCode;
		return Cs(n) && (r = n), r !== Ju.SUCCESS && (e.data.ErrorCode = Number(r)), e
	}), (function(e) {
		return "Network Error" === e.message && (!0 === qv.defaults.withCredentials && Ms.warn(
			"Network Error, try to close `IMAxiosAVChatroom.defaults.withCredentials` to false. (IMAxiosAVChatroom.js)"
			), qv.defaults.withCredentials = !1), Promise.reject(e)
	}));
	var xv = Lv.CancelToken,
		Fv = function() {
			function e(t) {
				In(this, e), this._initializeOptions(t), this._initializeMembers(), this.status = new Uv
			}
			return En(e, [{
				key: "destructor",
				value: function() {
					clearTimeout(this._seedID);
					var e = this._index();
					for (var t in this) Object.prototype.hasOwnProperty.call(this, t) && (this[
						t] = null);
					return e
				}
			}, {
				key: "setIndex",
				value: function(e) {
					this._index = e
				}
			}, {
				key: "getIndex",
				value: function() {
					return this._index
				}
			}, {
				key: "isRunning",
				value: function() {
					return !this._stoped
				}
			}, {
				key: "_initializeOptions",
				value: function(e) {
					this.options = e
				}
			}, {
				key: "_initializeMembers",
				value: function() {
					this._index = -1, this._seedID = 0, this._requestStatus = !1, this
						._stoped = !1, this._intervalTime = 0, this._intervalIncreaseStep = 1e3,
						this._intervalDecreaseStep = 1e3, this._intervalTimeMax = 5e3, this
						._protectTimeout = 3e3, this._getNoticeSeq = this.options.getNoticeSeq,
						this._retryCount = 0, this._responseTime = Date.now(), this
						._responseTimeThreshold = 2e3, this.options.isAVChatRoomLoop ? this
						.requestor = qv : this.requestor = wv, Ms.log(
							"XHRRunLoop._initializeMembers isAVChatRoomLoop=".concat(!!this
								.options.isAVChatRoomLoop)), this.abort = null
				}
			}, {
				key: "start",
				value: function() {
					0 === this._seedID ? (this._stoped = !1, this._send()) : Ms.log(
						'XHRRunLoop.start(), XHRRunLoop is running now, if you want to restart runLoop , please run "stop()" first.'
						)
				}
			}, {
				key: "_reset",
				value: function() {
					Ms.log("XHRRunLoop._reset(), reset long poll _intervalTime", this
						._intervalTime), this.stop(), this.start()
				}
			}, {
				key: "_intervalTimeIncrease",
				value: function() {
					this._intervalTime !== this._responseTimeThreshold && (this._intervalTime <
						this._responseTimeThreshold && (this._intervalTime += this
							._intervalIncreaseStep), this._intervalTime > this
						._responseTimeThreshold && (this._intervalTime = this
							._responseTimeThreshold))
				}
			}, {
				key: "_intervalTimeDecrease",
				value: function() {
					0 !== this._intervalTime && (this._intervalTime > 0 && (this
							._intervalTime -= this._intervalDecreaseStep), this
						._intervalTime < 0 && (this._intervalTime = 0))
				}
			}, {
				key: "_intervalTimeAdjustment",
				value: function() {
					var e = Date.now();
					100 * Math.floor((e - this._responseTime) / 100) <= this
						._responseTimeThreshold ? this._intervalTimeIncrease() : this
						._intervalTimeDecrease(), this._responseTime = e
				}
			}, {
				key: "_intervalTimeAdjustmentBaseOnResponseData",
				value: function(e) {
					e.ErrorCode === Ju.SUCCESS ? this._intervalTimeDecrease() : this
						._intervalTimeIncrease()
				}
			}, {
				key: "_send",
				value: function() {
					var e = this;
					if (!0 !== this._requestStatus) {
						this._requestStatus = !0, this.status.request++, "function" ==
							typeof this.options.before && this.options.before(this.options.pack
								.requestData);
						var t = Date.now(),
							n = 0;
						this.requestor.request({
							url: this.options.pack.getUrl(),
							data: this.options.pack.requestData,
							method: this.options.pack.method,
							cancelToken: new xv((function(t) {
								e.abort = t
							}))
						}).then((function(r) {
							if (e._intervalTimeAdjustmentBaseOnResponseData.bind(e)(
									r.data), e._retryCount > 0 && (e._retryCount =
									0), e.status.success++, n = Date.now(), e.status
								.setRequestTime(t, n), r.data.timecost = n - t,
								"function" == typeof e.options.success) try {
								e.options.success({
									pack: e.options.pack,
									error: !1,
									data: e.options.pack.callback(r
										.data)
								})
							} catch (o) {
								Ms.warn("XHRRunLoop._send(), error:", o)
							}
							e._requestStatus = !1, !1 === e._stoped && (e._seedID =
									setTimeout(e._send.bind(e), e._intervalTime)), e
								.status.report()
						})).catch((function(r) {
							if (e.status.fail++, e._retryCount++, e
								._intervalTimeAdjustment.bind(e)(), !1 === e
								._stoped && (e._seedID = setTimeout(e._send.bind(e),
									e._intervalTime)), e._requestStatus = !1,
								"function" == typeof e.options.fail && void 0 !== r
								.request) try {
								e.options.fail({
									pack: e.options.pack,
									error: r,
									data: !1
								})
							} catch (o) {
								Ms.warn("XHRRunLoop._send(), fail callback error:",
									o), Ms.error(o)
							}
							n = Date.now(), e.status.setRequestTime(t, n), e.status
								.report()
						}))
					}
				}
			}, {
				key: "stop",
				value: function() {
					this._clearAllTimeOut(), this._stoped = !0
				}
			}, {
				key: "_clearAllTimeOut",
				value: function() {
					clearTimeout(this._seedID), this._seedID = 0
				}
			}]), e
		}(),
		Vv = function() {
			function e(t) {
				In(this, e), this._initializeOptions(t), this._initializeMembers(), this.status = new Uv
			}
			return En(e, [{
				key: "destructor",
				value: function() {
					clearTimeout(this._seedID);
					var e = this._index();
					for (var t in this) Object.prototype.hasOwnProperty.call(this, t) && (this[
						t] = null);
					return e
				}
			}, {
				key: "setIndex",
				value: function(e) {
					this._index = e
				}
			}, {
				key: "isRunning",
				value: function() {
					return !this._stoped
				}
			}, {
				key: "getIndex",
				value: function() {
					return this._index
				}
			}, {
				key: "_initializeOptions",
				value: function(e) {
					this.options = e
				}
			}, {
				key: "_initializeMembers",
				value: function() {
					this._index = -1, this._seedID = 0, this._requestStatus = !1, this
						._stoped = !1, this._intervalTime = 0, this._intervalIncreaseStep = 1e3,
						this._intervalDecreaseStep = 1e3, this._intervalTimeMax = 5e3, this
						._protectTimeout = 3e3, this._getNoticeSeq = this.options.getNoticeSeq,
						this._retryCount = 0, this._responseTime = Date.now(), this
						._responseTimeThreshold = 2e3, this.requestor = new Gv, this.abort =
						null
				}
			}, {
				key: "start",
				value: function() {
					0 === this._seedID ? (this._stoped = !1, this._send()) : Ms.log(
						'WXRunLoop.start(): WXRunLoop is running now, if you want to restart runLoop , please run "stop()" first.'
						)
				}
			}, {
				key: "_reset",
				value: function() {
					Ms.log("WXRunLoop.reset(), long poll _intervalMaxRate", this
						._intervalMaxRate), this.stop(), this.start()
				}
			}, {
				key: "_intervalTimeIncrease",
				value: function() {
					this._intervalTime !== this._responseTimeThreshold && (this._intervalTime <
						this._responseTimeThreshold && (this._intervalTime += this
							._intervalIncreaseStep), this._intervalTime > this
						._responseTimeThreshold && (this._intervalTime = this
							._responseTimeThreshold))
				}
			}, {
				key: "_intervalTimeDecrease",
				value: function() {
					0 !== this._intervalTime && (this._intervalTime > 0 && (this
							._intervalTime -= this._intervalDecreaseStep), this
						._intervalTime < 0 && (this._intervalTime = 0))
				}
			}, {
				key: "_intervalTimeAdjustment",
				value: function() {
					var e = Date.now();
					100 * Math.floor((e - this._responseTime) / 100) <= this
						._responseTimeThreshold ? this._intervalTimeIncrease() : this
						._intervalTimeDecrease(), this._responseTime = e
				}
			}, {
				key: "_intervalTimeAdjustmentBaseOnResponseData",
				value: function(e) {
					e.ErrorCode === Ju.SUCCESS ? this._intervalTimeDecrease() : this
						._intervalTimeIncrease()
				}
			}, {
				key: "_send",
				value: function() {
					var e = this;
					if (!0 !== this._requestStatus) {
						var t = this;
						this._requestStatus = !0, this.status.request++, "function" ==
							typeof this.options.before && this.options.before(t.options.pack
								.requestData);
						var n = Date.now(),
							r = 0;
						this.requestor.request({
							url: t.options.pack.getUrl(),
							data: t.options.pack.requestData,
							method: t.options.pack.method,
							updateAbort: function(t) {
								e.abort = t
							}
						}).then((function(o) {
							if (t._intervalTimeAdjustmentBaseOnResponseData.bind(e)(
									o.data), t._retryCount > 0 && (t._retryCount =
									0), e.status.success++, r = Date.now(), e.status
								.setRequestTime(n, r), o.data.timecost = r - n,
								"function" == typeof t.options.success) try {
								e.options.success({
									pack: e.options.pack,
									error: !1,
									data: e.options.pack.callback(o
										.data)
								})
							} catch (i) {
								Ms.warn("WXRunLoop._send(), error:", i)
							}
							t._requestStatus = !1, !1 === t._stoped && (t._seedID =
									setTimeout(t._send.bind(t), t._intervalTime)), e
								.status.report()
						})).catch((function(o) {
							if (e.status.fail++, t._retryCount++, t
								._intervalTimeAdjustment.bind(e)(), !1 === t
								._stoped && (t._seedID = setTimeout(t._send.bind(t),
									t._intervalTime)), t._requestStatus = !1,
								"function" == typeof t.options.fail) try {
								e.options.fail({
									pack: e.options.pack,
									error: o,
									data: !1
								})
							} catch (i) {
								Ms.warn("WXRunLoop._send(), fail callback error:",
									i), Ms.error(i)
							}
							r = Date.now(), e.status.setRequestTime(n, r), e.status
								.report()
						}))
					}
				}
			}, {
				key: "stop",
				value: function() {
					this._clearAllTimeOut(), this._stoped = !0
				}
			}, {
				key: "_clearAllTimeOut",
				value: function() {
					clearTimeout(this._seedID), this._seedID = 0
				}
			}]), e
		}(),
		Bv = function() {
			function e(t) {
				In(this, e), this.tim = t, this.httpConnection = Fa ? new Gv : new Pv, this
					.keepAliveConnections = []
			}
			return En(e, [{
				key: "initializeListener",
				value: function() {
					this.tim.innerEmitter.on(Md, this._stopAllRunLoop, this)
				}
			}, {
				key: "request",
				value: function(e) {
					var t = {
						url: e.url,
						data: e.requestData,
						method: e.method,
						callback: e.callback
					};
					return this.httpConnection.request(t).then((function(t) {
						return t.data = e.callback(t.data), t.data.errorCode !== Ju
							.SUCCESS ? Xd(new Vp({
								code: t.data.errorCode,
								message: t.data.errorInfo || t.data.errorMsg
							})) : t
					}))
				}
			}, {
				key: "createRunLoop",
				value: function(e) {
					var t = this.createKeepAliveConnection(e);
					return t.setIndex(this.keepAliveConnections.push(t) - 1), t
				}
			}, {
				key: "stopRunLoop",
				value: function(e) {
					e.stop()
				}
			}, {
				key: "_stopAllRunLoop",
				value: function() {
					for (var e = this.keepAliveConnections.length, t = 0; t < e; t++) this
						.keepAliveConnections[t].stop()
				}
			}, {
				key: "destroyRunLoop",
				value: function(e) {
					e.stop();
					var t = e.destructor();
					this.keepAliveConnections.slice(t, 1)
				}
			}, {
				key: "startRunLoopExclusive",
				value: function(e) {
					for (var t = e.getIndex(), n = 0; n < this.keepAliveConnections.length; n++)
						n !== t && this.keepAliveConnections[n].stop();
					e.start()
				}
			}, {
				key: "createKeepAliveConnection",
				value: function(e) {
					return Fa ? new Vv(e) : (this.tim.options.runLoopNetType === vp || this.tim
						.options.runLoopNetType, new Fv(e))
				}
			}, {
				key: "clearAll",
				value: function() {
					this.conn.cancelAll()
				}
			}, {
				key: "reset",
				value: function() {
					this.keepAliveConnections = []
				}
			}]), e
		}(),
		jv = function() {
			function e(t) {
				In(this, e), this.tim = t, this.tim.innerEmitter.on(Ed, this._onErrorDetected, this)
			}
			return En(e, [{
				key: "_onErrorDetected",
				value: function(e) {
					var t = e.data;
					new hg(Cm).setText("code=".concat(t.code, " message=").concat(t.message))
						.setNetworkType(this.tim.netMonitor.getNetworkType()).setEnd(), t.code ?
						Ms.warn("Oops! code:".concat(t.code, " message:").concat(t.message)) :
						Ms.warn("Oops! message:".concat(t.message, " stack:").concat(t.stack)),
						this.tim.outerEmitter.emit(yn.ERROR, t)
				}
			}]), e
		}(),
		Kv = function() {
			function e(t) {
				var n = this;
				In(this, e), ou(t) || (this.userID = t.userID || "", this.nick = t.nick || "", this.gender = t
					.gender || "", this.birthday = t.birthday || 0, this.location = t.location || "", this
					.selfSignature = t.selfSignature || "", this.allowType = t.allowType || _n
					.ALLOW_TYPE_ALLOW_ANY, this.language = t.language || 0, this.avatar = t.avatar || "",
					this.messageSettings = t.messageSettings || 0, this.adminForbidType = t
					.adminForbidType || _n.FORBID_TYPE_NONE, this.level = t.level || 0, this.role = t
					.role || 0, this.lastUpdatedTime = 0, this.profileCustomField = [], ou(t
						.profileCustomField) || t.profileCustomField.forEach((function(e) {
						n.profileCustomField.push({
							key: e.key,
							value: e.value
						})
					})))
			}
			return En(e, [{
				key: "validate",
				value: function(e) {
					var t = !0,
						n = "";
					if (ou(e)) return {
						valid: !1,
						tips: "empty options"
					};
					if (e.profileCustomField)
						for (var r = e.profileCustomField.length, o = null, i = 0; i < r; i++) {
							if (o = e.profileCustomField[i], !Es(o.key) || -1 === o.key.indexOf(
									"Tag_Profile_Custom")) return {
								valid: !1,
								tips: "自定义资料字段的前缀必须是 Tag_Profile_Custom"
							};
							if (!Es(o.value)) return {
								valid: !1,
								tips: "自定义资料字段的 value 必须是字符串"
							}
						}
					for (var a in e)
						if (Object.prototype.hasOwnProperty.call(e, a)) {
							if ("profileCustomField" === a) continue;
							if (ou(e[a]) && !Es(e[a]) && !Cs(e[a])) {
								n = "key:" + a + ", invalid value:" + e[a], t = !1;
								continue
							}
							switch (a) {
								case "nick":
									Es(e[a]) || (n = "nick should be a string", t = !1), qs(e[
										a]) > 500 && (n =
										"nick name limited: must less than or equal to "
										.concat(500, " bytes, current size: ").concat(qs(e[
											a]), " bytes"), t = !1);
									break;
								case "gender":
									Bs(Ip, e.gender) || (n = "key:gender, invalid value:" + e
										.gender, t = !1);
									break;
								case "birthday":
									Cs(e.birthday) || (n = "birthday should be a number", t = !
										1);
									break;
								case "location":
									Es(e.location) || (n = "location should be a string", t = !
										1);
									break;
								case "selfSignature":
									Es(e.selfSignature) || (n =
										"selfSignature should be a string", t = !1);
									break;
								case "allowType":
									Bs(Ep, e.allowType) || (n =
										"key:allowType, invalid value:" + e.allowType, t = !
										1);
									break;
								case "language":
									Cs(e.language) || (n = "language should be a number", t = !
										1);
									break;
								case "avatar":
									Es(e.avatar) || (n = "avatar should be a string", t = !1);
									break;
								case "messageSettings":
									0 !== e.messageSettings && 1 !== e.messageSettings && (n =
										"messageSettings should be 0 or 1", t = !1);
									break;
								case "adminForbidType":
									Bs(Cp, e.adminForbidType) || (n =
										"key:adminForbidType, invalid value:" + e
										.adminForbidType, t = !1);
									break;
								case "level":
									Cs(e.level) || (n = "level should be a number", t = !1);
									break;
								case "role":
									Cs(e.role) || (n = "role should be a number", t = !1);
									break;
								default:
									n = "unknown key:" + a + "  " + e[a], t = !1
							}
						} return {
						valid: t,
						tips: n
					}
				}
			}]), e
		}(),
		Hv = function() {
			function e(t) {
				In(this, e), this.userController = t, this.TAG = "profile", this.Actions = {
					Q: "query",
					U: "update"
				}, this.accountProfileMap = new Map, this.expirationTime = 864e5
			}
			return En(e, [{
				key: "setExpirationTime",
				value: function(e) {
					this.expirationTime = e
				}
			}, {
				key: "getUserProfile",
				value: function(e) {
					var t = this,
						n = e.userIDList;
					e.fromAccount = this.userController.getMyAccount(), n.length > 100 && (Ms
						.warn("ProfileHandler.getUserProfile 获取用户资料人数不能超过100人"), n.length =
						100);
					for (var r, o = [], i = [], a = 0, s = n.length; a < s; a++) r = n[a], this
						.userController.isMyFriend(r) && this._containsAccount(r) ? i.push(this
							._getProfileFromMap(r)) : o.push(r);
					if (0 === o.length) return Jd(i);
					e.toAccount = o;
					var u = e.bFromGetMyProfile || !1,
						c = [];
					e.toAccount.forEach((function(e) {
						c.push({
							toAccount: e,
							standardSequence: 0,
							customSequence: 0
						})
					})), e.userItem = c;
					var l = new hg(gm);
					l.setText(n.length > 5 ? "userIDList.length=".concat(n.length) :
						"userIDList=".concat(n));
					var p = this.userController.generateConfig(this.TAG, this.Actions.Q, e);
					return this.userController.request(p).then((function(e) {
						l.setNetworkType(t.userController.getNetworkType())
						.setEnd(), Ms.info("ProfileHandler.getUserProfile ok");
						var n = t._handleResponse(e).concat(i);
						return u ? (t.userController.onGotMyProfile(), new zd(n[
							0])) : new zd(n)
					})).catch((function(e) {
						return t.userController.probeNetwork().then((function(t) {
								var n = Un(t, 2),
									r = n[0],
									o = n[1];
								l.setError(e, r, o).setEnd()
							})), Ms.error("ProfileHandler.getUserProfile error:",
							e), Xd(e)
					}))
				}
			}, {
				key: "getMyProfile",
				value: function() {
					var e = this.userController.getMyAccount();
					if (Ms.log("ProfileHandler.getMyProfile myAccount=" + e), this._fillMap(),
						this._containsAccount(e)) {
						var t = this._getProfileFromMap(e);
						return Ms.debug("ProfileHandler.getMyProfile from cache, myProfile:" +
							JSON.stringify(t)), this.userController.onGotMyProfile(), Jd(t)
					}
					return this.getUserProfile({
						fromAccount: e,
						userIDList: [e],
						bFromGetMyProfile: !0
					})
				}
			}, {
				key: "_handleResponse",
				value: function(e) {
					for (var t, n, r = bs.now(), o = e.data.userProfileItem, i = [], a = 0, s =
							o.length; a < s; a++) "@TLS#NOT_FOUND" !== o[a].to && "" !== o[a]
						.to && (t = o[a].to, n = this._updateMap(t, this
							._getLatestProfileFromResponse(t, o[a].profileItem)), i.push(n));
					return Ms.log("ProfileHandler._handleResponse cost " + (bs.now() - r) +
						" ms"), i
				}
			}, {
				key: "_getLatestProfileFromResponse",
				value: function(e, t) {
					var n = {};
					if (n.userID = e, n.profileCustomField = [], !ou(t))
						for (var r = 0, o = t.length; r < o; r++)
							if (t[r].tag.indexOf("Tag_Profile_Custom") > -1) n
								.profileCustomField.push({
									key: t[r].tag,
									value: t[r].value
								});
							else switch (t[r].tag) {
								case Mp.NICK:
									n.nick = t[r].value;
									break;
								case Mp.GENDER:
									n.gender = t[r].value;
									break;
								case Mp.BIRTHDAY:
									n.birthday = t[r].value;
									break;
								case Mp.LOCATION:
									n.location = t[r].value;
									break;
								case Mp.SELFSIGNATURE:
									n.selfSignature = t[r].value;
									break;
								case Mp.ALLOWTYPE:
									n.allowType = t[r].value;
									break;
								case Mp.LANGUAGE:
									n.language = t[r].value;
									break;
								case Mp.AVATAR:
									n.avatar = t[r].value;
									break;
								case Mp.MESSAGESETTINGS:
									n.messageSettings = t[r].value;
									break;
								case Mp.ADMINFORBIDTYPE:
									n.adminForbidType = t[r].value;
									break;
								case Mp.LEVEL:
									n.level = t[r].value;
									break;
								case Mp.ROLE:
									n.role = t[r].value;
									break;
								default:
									Ms.warn("ProfileHandler._handleResponse unkown tag->",
										t[r].tag, t[r].value)
							}
					return n
				}
			}, {
				key: "updateMyProfile",
				value: function(e) {
					var t = this,
						n = new hg(mm);
					n.setText(JSON.stringify(e));
					var r = (new Kv).validate(e);
					if (!r.valid) return n.setCode(Bp.UPDATE_PROFILE_INVALID_PARAM).setMessage(
							"ProfileHandler.updateMyProfile info:".concat(r.tips))
						.setNetworkType(this.userController.getNetworkType()).setEnd(), Ms
						.error("ProfileHandler.updateMyProfile info:".concat(r.tips,
							"，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#updateMyProfile"
							)), Xd({
							code: Bp.UPDATE_PROFILE_INVALID_PARAM,
							message: Vf
						});
					var o = [];
					for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (
						"profileCustomField" === i ? e.profileCustomField.forEach((function(
							e) {
							o.push({
								tag: e.key,
								value: e.value
							})
						})) : o.push({
							tag: Mp[i.toUpperCase()],
							value: e[i]
						}));
					if (0 === o.length) return n.setCode(Bp.UPDATE_PROFILE_NO_KEY).setMessage(
						Bf).setNetworkType(this.userController.getNetworkType())
					.setEnd(), Ms.error("ProfileHandler.updateMyProfile info:".concat(
						Bf,
						"，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#updateMyProfile"
						)), Xd({
						code: Bp.UPDATE_PROFILE_NO_KEY,
						message: Bf
					});
					var a = this.userController.generateConfig(this.TAG, this.Actions.U, {
						fromAccount: this.userController.getMyAccount(),
						profileItem: o
					});
					return this.userController.request(a).then((function(r) {
						n.setNetworkType(t.userController.getNetworkType())
						.setEnd(), Ms.info("ProfileHandler.updateMyProfile ok");
						var o = t._updateMap(t.userController.getMyAccount(), e);
						return t.userController.emitOuterEvent(yn.PROFILE_UPDATED, [
							o
						]), Jd(o)
					})).catch((function(e) {
						return t.userController.probeNetwork().then((function(t) {
							var r = Un(t, 2),
								o = r[0],
								i = r[1];
							n.setError(e, o, i).setEnd()
						})), Ms.error("ProfileHandler.updateMyProfile error:",
							e), Xd(e)
					}))
				}
			}, {
				key: "onProfileModified",
				value: function(e) {
					var t = e.data;
					if (!ou(t)) {
						var n, r, o = t.length;
						Ms.info("ProfileHandler.onProfileModified length=" + o);
						for (var i = [], a = 0; a < o; a++) n = t[a].userID, r = this
							._updateMap(n, this._getLatestProfileFromResponse(n, t[a]
								.profileList)), i.push(r);
						this.userController.emitInnerEvent(kd, i), this.userController
							.emitOuterEvent(yn.PROFILE_UPDATED, i)
					}
				}
			}, {
				key: "_fillMap",
				value: function() {
					if (0 === this.accountProfileMap.size) {
						for (var e = this._getCachedProfiles(), t = Date.now(), n = 0, r = e
								.length; n < r; n++) t - e[n].lastUpdatedTime < this
							.expirationTime && this.accountProfileMap.set(e[n].userID, e[n]);
						Ms.log("ProfileHandler._fillMap from cache, map.size=" + this
							.accountProfileMap.size)
					}
				}
			}, {
				key: "_updateMap",
				value: function(e, t) {
					var n, r = Date.now();
					return this._containsAccount(e) ? (n = this._getProfileFromMap(e), t
							.profileCustomField && $s(n.profileCustomField, t
								.profileCustomField), Ps(n, t, ["profileCustomField"]), n
							.lastUpdatedTime = r) : (n = new Kv(t), (this.userController
							.isMyFriend(e) || e === this.userController.getMyAccount()) && (
							n.lastUpdatedTime = r, this.accountProfileMap.set(e, n))), this
						._flushMap(e === this.userController.getMyAccount()), n
				}
			}, {
				key: "_flushMap",
				value: function(e) {
					var t = qn(this.accountProfileMap.values()),
						n = this.userController.tim.storage;
					Ms.debug("ProfileHandler._flushMap length=".concat(t.length,
						" flushAtOnce=").concat(e)), n.setItem(this.TAG, t, e)
				}
			}, {
				key: "_containsAccount",
				value: function(e) {
					return this.accountProfileMap.has(e)
				}
			}, {
				key: "_getProfileFromMap",
				value: function(e) {
					return this.accountProfileMap.get(e)
				}
			}, {
				key: "_getCachedProfiles",
				value: function() {
					var e = this.userController.tim.storage.getItem(this.TAG);
					return ou(e) ? [] : e
				}
			}, {
				key: "onConversationsProfileUpdated",
				value: function(e) {
					for (var t, n, r, o = [], i = 0, a = e.length; i < a; i++) n = (t = e[i])
						.userID, this.userController.isMyFriend(n) && (this._containsAccount(
							n) ? (r = this._getProfileFromMap(n), Ps(r, t) > 0 && o.push(n)) : o
							.push(t.userID));
					0 !== o.length && (Ms.info(
							"ProfileHandler.onConversationsProfileUpdated toAccount:", o),
						this.getUserProfile({
							userIDList: o
						}))
				}
			}, {
				key: "getNickAndAvatarByUserID",
				value: function(e) {
					if (this._containsAccount(e)) {
						var t = this._getProfileFromMap(e);
						return {
							nick: t.nick,
							avatar: t.avatar
						}
					}
					return {
						nick: "",
						avatar: ""
					}
				}
			}, {
				key: "reset",
				value: function() {
					this._flushMap(!0), this.accountProfileMap.clear()
				}
			}]), e
		}();
	Re({
		target: "String",
		proto: !0
	}, {
		repeat: uo
	});
	var $v = function() {
			function e(t) {
				In(this, e), this.options = t ? t.options : {
						enablePointer: !0
					}, this.pointsList = {}, this.reportText = {}, this.maxNameLen = 0, this.gapChar = "-", this
					.log = console.log, this.currentTask = ""
			}
			return En(e, [{
				key: "newTask",
				value: function(e) {
					!1 !== this.options.enablePointer && (e || (e = ["task", this._timeFormat()]
							.join("-")), this.pointsList[e] = [], this.currentTask = e,
						console.log("Pointer new Task : ".concat(this.currentTask)))
				}
			}, {
				key: "deleteTask",
				value: function(e) {
					!1 !== this.options.enablePointer && (e || (e = this.currentTask), this
						.pointsList[e].length = 0, delete this.pointsList[e])
				}
			}, {
				key: "dot",
				value: function() {
					var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
						t = arguments.length > 1 ? arguments[1] : void 0;
					if (!1 !== this.options.enablePointer) {
						t = t || this.currentTask;
						var n = +new Date;
						this.maxNameLen = this.maxNameLen < e.length ? e.length : this
							.maxNameLen, this.flen = this.maxNameLen + 10, this.pointsList[t]
							.push({
								pointerName: e,
								time: n
							})
					}
				}
			}, {
				key: "_analisys",
				value: function(e) {
					if (!1 !== this.options.enablePointer) {
						e = e || this.currentTask;
						for (var t = this.pointsList[e], n = t.length, r = [], o = [], i =
							0; i < n; i++) 0 !== i && (o = this._analisysTowPoints(t[i - 1], t[
							i]), r.push(o.join("")));
						return o = this._analisysTowPoints(t[0], t[n - 1], !0), r.push(o.join(
							"")), r.join("")
					}
				}
			}, {
				key: "_analisysTowPoints",
				value: function(e, t) {
					var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
					if (!1 !== this.options.enablePointer) {
						var r = this.flen,
							o = t.time - e.time,
							i = o.toString(),
							a = e.pointerName + this.gapChar.repeat(r - e.pointerName.length),
							s = t.pointerName + this.gapChar.repeat(r - t.pointerName.length),
							u = this.gapChar.repeat(4 - i.length) + i,
							c = n ? ["%c", a, s, u, "ms\n%c"] : [a, s, u, "ms\n"];
						return c
					}
				}
			}, {
				key: "report",
				value: function(e) {
					if (!1 !== this.options.enablePointer) {
						e = e || this.currentTask;
						var t = this._analisys(e);
						this.pointsList = [];
						var n = this._timeFormat(),
							r = "Pointer[".concat(e, "(").concat(n, ")]"),
							o = 4 * this.maxNameLen,
							i = (o - r.length) / 2;
						console.log(["-".repeat(i), r, "-".repeat(i)].join("")), console.log(
							"%c" + t, "color:#66a", "color:red", "color:#66a"), console.log(
							"-".repeat(o))
					}
				}
			}, {
				key: "_timeFormat",
				value: function() {
					var e = new Date,
						t = this.zeroFix(e.getMonth() + 1, 2),
						n = this.zeroFix(e.getDate(), 2);
					return "".concat(t, "-").concat(n, " ").concat(e.getHours(), ":").concat(e
						.getSeconds(), ":").concat(e.getMinutes(), "~").concat(e
						.getMilliseconds())
				}
			}, {
				key: "zeroFix",
				value: function(e, t) {
					return ("000000000" + e).slice(-t)
				}
			}, {
				key: "reportAll",
				value: function() {
					if (!1 !== this.options.enablePointer)
						for (var e in this.pointsList) Object.prototype.hasOwnProperty.call(this
							.pointsList, e) && this.eport(e)
				}
			}]), e
		}(),
		zv = function e(t, n) {
			In(this, e), this.userID = t;
			var r = {};
			if (r.userID = t, !ou(n))
				for (var o = 0, i = n.length; o < i; o++) switch (n[o].tag) {
					case Mp.NICK:
						r.nick = n[o].value;
						break;
					case Mp.GENDER:
						r.gender = n[o].value;
						break;
					case Mp.BIRTHDAY:
						r.birthday = n[o].value;
						break;
					case Mp.LOCATION:
						r.location = n[o].value;
						break;
					case Mp.SELFSIGNATURE:
						r.selfSignature = n[o].value;
						break;
					case Mp.ALLOWTYPE:
						r.allowType = n[o].value;
						break;
					case Mp.LANGUAGE:
						r.language = n[o].value;
						break;
					case Mp.AVATAR:
						r.avatar = n[o].value;
						break;
					case Mp.MESSAGESETTINGS:
						r.messageSettings = n[o].value;
						break;
					case Mp.ADMINFORBIDTYPE:
						r.adminForbidType = n[o].value;
						break;
					case Mp.LEVEL:
						r.level = n[o].value;
						break;
					case Mp.ROLE:
						r.role = n[o].value;
						break;
					default:
						Ms.debug("snsProfileItem unkown tag->", n[o].tag)
				}
			this.profile = new Kv(r)
		},
		Wv = function() {
			function e(t) {
				In(this, e), this.userController = t, this.TAG = "friend", this.Actions = {
					G: "get",
					D: "delete"
				}, this.friends = new Map, this.pointer = new $v
			}
			return En(e, [{
				key: "isMyFriend",
				value: function(e) {
					var t = this.friends.has(e);
					return t || Ms.debug("FriendHandler.isMyFriend " + e + " is not my friend"),
						t
				}
			}, {
				key: "_transformFriendList",
				value: function(e) {
					if (!ou(e) && !ou(e.infoItem)) {
						Ms.info("FriendHandler._transformFriendList friendNum=" + e.friendNum);
						for (var t, n, r = e.infoItem, o = 0, i = r.length; o < i; o++) n = r[o]
							.infoAccount, t = new zv(n, r[o].snsProfileItem), this.friends.set(
								n, t)
					}
				}
			}, {
				key: "_friends2map",
				value: function(e) {
					var t = new Map;
					for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.set(n, e[
						n]);
					return t
				}
			}, {
				key: "getFriendList",
				value: function() {
					var e = this,
						t = {};
					t.fromAccount = this.userController.getMyAccount(), Ms.info(
						"FriendHandler.getFriendList myAccount=" + t.fromAccount);
					var n = this.userController.generateConfig(this.TAG, this.Actions.G, t);
					return this.userController.request(n).then((function(t) {
						Ms.info("FriendHandler.getFriendList ok"), e
							._transformFriendList(t.data);
						var n = qn(e.friends.values());
						return Jd(n)
					})).catch((function(e) {
						return Ms.error("FriendHandler.getFriendList error:", e),
							Xd(e)
					}))
				}
			}, {
				key: "deleteFriend",
				value: function(e) {
					if (!Array.isArray(e.toAccount)) return Ms.error(
						"FriendHandler.deleteFriend options.toAccount 必需是数组"), Xd({
						code: Bp.DEL_FRIEND_INVALID_PARAM,
						message: Ff
					});
					e.toAccount.length > 1e3 && (Ms.warn(
							"FriendHandler.deleteFriend 删除好友人数不能超过1000人"), e.toAccount
						.length = 1e3);
					var t = this.userController.generateConfig(this.TAG, this.Actions.D, e);
					return this.userController.request(t).then((function(e) {
						return Ms.info("FriendHandler.deleteFriend ok"), Jd()
					})).catch((function(e) {
						return Ms.error("FriendHandler.deleteFriend error:", e), Xd(
							e)
					}))
				}
			}]), e
		}(),
		Yv = function e(t) {
			In(this, e), ou || (this.userID = t.userID || "", this.timeStamp = t.timeStamp || 0)
		},
		Jv = function() {
			function e(t) {
				In(this, e), this.userController = t, this.TAG = "blacklist", this.Actions = {
						G: "get",
						C: "create",
						D: "delete"
					}, this.blacklistMap = new Map, this.startIndex = 0, this.maxLimited = 100, this
					.curruentSequence = 0
			}
			return En(e, [{
				key: "getBlacklist",
				value: function() {
					var e = this,
						t = {};
					t.fromAccount = this.userController.getMyAccount(), t.maxLimited = this
						.maxLimited, t.startIndex = 0, t.lastSequence = this.curruentSequence;
					var n = new hg(vm),
						r = this.userController.generateConfig(this.TAG, this.Actions.G, t);
					return this.userController.request(r).then((function(t) {
						var r = ou(t.data.blackListItem) ? 0 : t.data.blackListItem
							.length;
						return n.setNetworkType(e.userController.getNetworkType())
							.setText(r).setEnd(), Ms.info(
								"BlacklistHandler.getBlacklist ok"), e
							.curruentSequence = t.data.curruentSequence, e
							._handleResponse(t.data.blackListItem, !0), e
							._onBlacklistUpdated()
					})).catch((function(t) {
						return e.userController.probeNetwork().then((function(e) {
								var r = Un(e, 2),
									o = r[0],
									i = r[1];
								n.setError(t, o, i).setEnd()
							})), Ms.error("BlacklistHandler.getBlacklist error:",
							t), Xd(t)
					}))
				}
			}, {
				key: "addBlacklist",
				value: function(e) {
					var t = this,
						n = new hg(ym);
					if (!Ds(e.userIDList)) return n.setCode(Bp.ADD_BLACKLIST_INVALID_PARAM)
						.setMessage(
							"BlacklistHandler.addBlacklist options.userIDList 必需是数组")
						.setNetworkType(this.userController.getNetworkType()).setEnd(), Ms
						.error("BlacklistHandler.addBlacklist options.userIDList 必需是数组"),
						Xd({
							code: Bp.ADD_BLACKLIST_INVALID_PARAM,
							message: jf
						});
					var r = this.userController.tim.loginInfo.identifier;
					if (1 === e.userIDList.length && e.userIDList[0] === r) return n.setCode(Bp
						.CANNOT_ADD_SELF_TO_BLACKLIST).setMessage(Hf).setNetworkType(
						this.userController.getNetworkType()).setEnd(), Ms.error(
						"BlacklistHandler.addBlacklist 不能把自己拉黑"), Xd({
						code: Bp.CANNOT_ADD_SELF_TO_BLACKLIST,
						message: Hf
					});
					e.userIDList.includes(r) && (e.userIDList = e.userIDList.filter((function(
						e) {
							return e !== r
						})), Ms.warn("BlacklistHandler.addBlacklist 不能把自己拉黑，已过滤")), e
						.fromAccount = this.userController.getMyAccount(), e.toAccount = e
						.userIDList;
					var o = this.userController.generateConfig(this.TAG, this.Actions.C, e);
					return this.userController.request(o).then((function(r) {
						return n.setNetworkType(t.userController.getNetworkType())
							.setText(e.userIDList.length > 5 ? "userIDList.length="
								.concat(e.userIDList.length) : "userIDList=".concat(
									e.userIDList)).setEnd(), Ms.info(
								"BlacklistHandler.addBlacklist ok"), t
							._handleResponse(r.data.resultItem, !0), t
							._onBlacklistUpdated()
					})).catch((function(e) {
						return t.userController.probeNetwork().then((function(t) {
								var r = Un(t, 2),
									o = r[0],
									i = r[1];
								n.setError(e, o, i).setEnd()
							})), Ms.error("BlacklistHandler.addBlacklist error:",
							e), Xd(e)
					}))
				}
			}, {
				key: "_handleResponse",
				value: function(e, t) {
					if (!ou(e))
						for (var n, r, o, i = 0, a = e.length; i < a; i++) r = e[i].to, o = e[i]
							.resultCode, (ks(o) || 0 === o) && (t ? ((n = this.blacklistMap.has(
									r) ? this.blacklistMap.get(r) : new Yv).userID = r, !ou(
									e[i].addBlackTimeStamp) && (n.timeStamp = e[i]
									.addBlackTimeStamp), this.blacklistMap.set(r, n)) : this
								.blacklistMap.has(r) && (n = this.blacklistMap.get(r), this
									.blacklistMap.delete(r)));
					Ms.log("BlacklistHandler._handleResponse total=" + this.blacklistMap.size +
						" bAdd=" + t)
				}
			}, {
				key: "deleteBlacklist",
				value: function(e) {
					var t = this,
						n = new hg(_m);
					if (!Ds(e.userIDList)) return n.setCode(Bp.DEL_BLACKLIST_INVALID_PARAM)
						.setMessage(
							"BlacklistHandler.deleteBlacklist options.userIDList 必需是数组")
						.setNetworkType(this.userController.getNetworkType()).setEnd(), Ms
						.error("BlacklistHandler.deleteBlacklist options.userIDList 必需是数组"),
						Xd({
							code: Bp.DEL_BLACKLIST_INVALID_PARAM,
							message: Kf
						});
					e.fromAccount = this.userController.getMyAccount(), e.toAccount = e
						.userIDList;
					var r = this.userController.generateConfig(this.TAG, this.Actions.D, e);
					return this.userController.request(r).then((function(r) {
						return n.setNetworkType(t.userController.getNetworkType())
							.setText(e.userIDList.length > 5 ? "userIDList.length="
								.concat(e.userIDList.length) : "userIDList=".concat(
									e.userIDList)).setEnd(), Ms.info(
								"BlacklistHandler.deleteBlacklist ok"), t
							._handleResponse(r.data.resultItem, !1), t
							._onBlacklistUpdated()
					})).catch((function(e) {
						return t.userController.probeNetwork().then((function(t) {
							var r = Un(t, 2),
								o = r[0],
								i = r[1];
							n.setError(e, o, i).setEnd()
						})), Ms.error("BlacklistHandler.deleteBlacklist error:",
							e), Xd(e)
					}))
				}
			}, {
				key: "_onBlacklistUpdated",
				value: function() {
					var e = qn(this.blacklistMap.keys());
					return this.userController.emitOuterEvent(yn.BLACKLIST_UPDATED, e), Jd(e)
				}
			}, {
				key: "handleBlackListDelAccount",
				value: function(e) {
					for (var t, n = [], r = 0, o = e.length; r < o; r++) t = e[r], this
						.blacklistMap.has(t) && (this.blacklistMap.delete(t), n.push(t));
					n.length > 0 && (Ms.log(
							"BlacklistHandler.handleBlackListDelAccount delCount=" + n
							.length + " : " + n.join(",")), this.userController
						.emitOuterEvent(yn.BLACKLIST_UPDATED, qn(this.blacklistMap.keys())))
				}
			}, {
				key: "handleBlackListAddAccount",
				value: function(e) {
					for (var t, n = [], r = 0, o = e.length; r < o; r++) t = e[r], this
						.blacklistMap.has(t) || (this.blacklistMap.set(t, new Yv({
							userID: t
						})), n.push(t));
					n.length > 0 && (Ms.log(
							"BlacklistHandler.handleBlackListAddAccount addCount=" + n
							.length + " : " + n.join(",")), this.userController
						.emitOuterEvent(yn.BLACKLIST_UPDATED, qn(this.blacklistMap.keys())))
				}
			}, {
				key: "reset",
				value: function() {
					this.blacklistMap.clear(), this.startIndex = 0, this.maxLimited = 100, this
						.curruentSequence = 0
				}
			}]), e
		}(),
		Xv = function() {
			function e(t) {
				In(this, e), this.userController = t, this.TAG = "applyC2C", this.Actions = {
					C: "create",
					G: "get",
					D: "delete",
					U: "update"
				}
			}
			return En(e, [{
				key: "applyAddFriend",
				value: function(e) {
					var t = this,
						n = this.userController.generateConfig(this.TAG, this.Actions.C, e),
						r = this.userController.request(n);
					return r.then((function(e) {
						t.userController.isActionSuccessful("applyAddFriend", t
							.Actions.C, e)
					})).catch((function(e) {})), r
				}
			}, {
				key: "getPendency",
				value: function(e) {
					var t = this,
						n = this.userController.generateConfig(this.TAG, this.Actions.G, e),
						r = this.userController.request(n);
					return r.then((function(e) {
						t.userController.isActionSuccessful("getPendency", t.Actions
							.G, e)
					})).catch((function(e) {})), r
				}
			}, {
				key: "deletePendency",
				value: function(e) {
					var t = this,
						n = this.userController.generateConfig(this.TAG, this.Actions.D, e),
						r = this.userController.request(n);
					return r.then((function(e) {
						t.userController.isActionSuccessful("deletePendency", t
							.Actions.D, e)
					})).catch((function(e) {})), r
				}
			}, {
				key: "replyPendency",
				value: function() {
					var e = this,
						t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
						n = this.userController.generateConfig(this.TAG, this.Actions.U, t),
						r = this.userController.request(n);
					return r.then((function(t) {
						e.userController.isActionSuccessful("replyPendency", e
							.Actions.U, t)
					})).catch((function(e) {})), r
				}
			}]), e
		}(),
		Qv = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e)).profileHandler = new Hv(bn(r)), r.friendHandler =
					new Wv(bn(r)), r.blacklistHandler = new Jv(bn(r)), r.applyC2CHandler = new Xv(bn(r)), r
					._initializeListener(), r
			}
			return En(n, [{
				key: "_initializeListener",
				value: function(e) {
					var t = this.tim.innerEmitter;
					t.on(Bh, this.onContextUpdated, this), t.on(ld, this.onProfileModified,
						this), t.on(cd, this.onNewFriendMessages, this), t.on(Td, this
						.onConversationsProfileUpdated, this)
				}
			}, {
				key: "onContextUpdated",
				value: function(e) {
					var t = this.tim.context;
					!1 != !!t.a2Key && !1 != !!t.tinyID && (this.profileHandler.getMyProfile(),
						this.friendHandler.getFriendList(), this.blacklistHandler
						.getBlacklist())
				}
			}, {
				key: "onGotMyProfile",
				value: function() {
					this.triggerReady()
				}
			}, {
				key: "onProfileModified",
				value: function(e) {
					this.profileHandler.onProfileModified(e)
				}
			}, {
				key: "onNewFriendMessages",
				value: function(e) {
					Ms.debug("onNewFriendMessages", JSON.stringify(e.data)), ou(e.data
							.blackListDelAccount) || this.blacklistHandler
						.handleBlackListDelAccount(e.data.blackListDelAccount), ou(e.data
							.blackListAddAccount) || this.blacklistHandler
						.handleBlackListAddAccount(e.data.blackListAddAccount)
				}
			}, {
				key: "onConversationsProfileUpdated",
				value: function(e) {
					this.profileHandler.onConversationsProfileUpdated(e.data)
				}
			}, {
				key: "getMyAccount",
				value: function() {
					return this.tim.context.identifier
				}
			}, {
				key: "isMyFriend",
				value: function(e) {
					return this.friendHandler.isMyFriend(e)
				}
			}, {
				key: "generateConfig",
				value: function(e, t, n) {
					return {
						name: e,
						action: t,
						param: n
					}
				}
			}, {
				key: "getMyProfile",
				value: function() {
					return this.profileHandler.getMyProfile()
				}
			}, {
				key: "getUserProfile",
				value: function(e) {
					return this.profileHandler.getUserProfile(e)
				}
			}, {
				key: "updateMyProfile",
				value: function(e) {
					return this.profileHandler.updateMyProfile(e)
				}
			}, {
				key: "getFriendList",
				value: function() {
					return this.friendHandler.getFriendList()
				}
			}, {
				key: "deleteFriend",
				value: function(e) {
					return this.friendHandler.deleteFriend(e)
				}
			}, {
				key: "getNickAndAvatarByUserID",
				value: function(e) {
					return this.profileHandler.getNickAndAvatarByUserID(e)
				}
			}, {
				key: "getBlacklist",
				value: function() {
					return this.blacklistHandler.getBlacklist()
				}
			}, {
				key: "addBlacklist",
				value: function(e) {
					return this.blacklistHandler.addBlacklist(e)
				}
			}, {
				key: "deleteBlacklist",
				value: function(e) {
					return this.blacklistHandler.deleteBlacklist(e)
				}
			}, {
				key: "applyAddFriend",
				value: function(e) {
					return this.applyC2CHandler.applyAddFriend(e)
				}
			}, {
				key: "getPendency",
				value: function(e) {
					return this.applyC2CHandler.getPendency(e)
				}
			}, {
				key: "deletePendency",
				value: function(e) {
					return this.applyC2CHandler.deletePendency(e)
				}
			}, {
				key: "replyPendency",
				value: function(e) {
					return this.applyC2CHandler.replyPendency(e)
				}
			}, {
				key: "reset",
				value: function() {
					Ms.info("UserController.reset"), this.resetReady(), this.profileHandler
						.reset(), this.blacklistHandler.reset(), this.checkTimes = 0
				}
			}]), n
		}(Kd),
		Zv = [],
		ey = Zv.sort,
		ty = o((function() {
			Zv.sort(void 0)
		})),
		ny = o((function() {
			Zv.sort(null)
		})),
		ry = ct("sort");
	Re({
		target: "Array",
		proto: !0,
		forced: ty || !ny || !ry
	}, {
		sort: function(e) {
			return void 0 === e ? ey.call(je(this)) : ey.call(je(this), Ve(e))
		}
	});
	var oy = ["groupID", "name", "avatar", "type", "introduction", "notification", "ownerID", "selfInfo",
			"createTime", "infoSequence", "lastInfoTime", "lastMessage", "nextMessageSeq", "memberNum",
			"maxMemberNum", "memberList", "joinOption", "groupCustomField", "muteAllMembers"
		],
		iy = function() {
			function e(t) {
				In(this, e), this.groupID = "", this.name = "", this.avatar = "", this.type = "", this
					.introduction = "", this.notification = "", this.ownerID = "", this.createTime = "", this
					.infoSequence = "", this.lastInfoTime = "", this.selfInfo = {
						messageRemindType: "",
						joinTime: "",
						nameCard: "",
						role: ""
					}, this.lastMessage = {
						lastTime: "",
						lastSequence: "",
						fromAccount: "",
						messageForShow: ""
					}, this.nextMessageSeq = "", this.memberNum = "", this.memberCount = "", this.maxMemberNum =
					"", this.maxMemberCount = "", this.joinOption = "", this.groupCustomField = [], this
					.muteAllMembers = void 0, this._initGroup(t)
			}
			return En(e, [{
				key: "memberNum",
				get: function() {
					return Ms.warn("！！！v2.8.0起弃用memberNum，请使用 memberCount"), this.memberCount
				},
				set: function(e) {}
			}, {
				key: "maxMemberNum",
				get: function() {
					return Ms.warn("！！！v2.8.0起弃用maxMemberNum，请使用 maxMemberCount"), this
						.maxMemberCount
				},
				set: function(e) {}
			}, {
				key: "_initGroup",
				value: function(e) {
					for (var t in e) oy.indexOf(t) < 0 || ("selfInfo" !== t ? ("memberNum" ===
							t && (this.memberCount = e[t]), "maxMemberNum" === t && (this
								.maxMemberCount = e[t]), this[t] = e[t]) : this
						.updateSelfInfo(e[t]))
				}
			}, {
				key: "updateGroup",
				value: function(e) {
					var t = JSON.parse(JSON.stringify(e));
					t.lastMsgTime && (this.lastMessage.lastTime = t.lastMsgTime), ks(t
							.muteAllMembers) || ("On" === t.muteAllMembers ? t
							.muteAllMembers = !0 : t.muteAllMembers = !1), t.groupCustomField &&
						$s(this.groupCustomField, t.groupCustomField), ks(t.memberNum) || (this
							.memberCount = t.memberNum), ks(t.maxMemberNum) || (this
							.maxMemberCount = t.maxMemberNum), Ps(this, t, ["members",
							"errorCode", "lastMsgTime", "groupCustomField", "memberNum",
							"maxMemberNum"
						])
				}
			}, {
				key: "updateSelfInfo",
				value: function(e) {
					var t = e.nameCard,
						n = e.joinTime,
						r = e.role,
						o = e.messageRemindType;
					Ps(this.selfInfo, {
						nameCard: t,
						joinTime: n,
						role: r,
						messageRemindType: o
					}, [], ["", null, void 0, 0, NaN])
				}
			}, {
				key: "setSelfNameCard",
				value: function(e) {
					this.selfInfo.nameCard = e
				}
			}]), e
		}(),
		ay = function(e, t) {
			if (ks(t)) return "";
			switch (e) {
				case _n.MSG_TEXT:
					return t.text;
				case _n.MSG_IMAGE:
					return "[图片]";
				case _n.MSG_GEO:
					return "[位置]";
				case _n.MSG_AUDIO:
					return "[语音]";
				case _n.MSG_VIDEO:
					return "[视频]";
				case _n.MSG_FILE:
					return "[文件]";
				case _n.MSG_CUSTOM:
					return "[自定义消息]";
				case _n.MSG_GRP_TIP:
					return "[群提示消息]";
				case _n.MSG_GRP_SYS_NOTICE:
					return "[群系统通知]";
				case _n.MSG_FACE:
					return "[动画表情]";
				case _n.MSG_MERGER:
					return "[聊天记录]";
				default:
					return ""
			}
		},
		sy = function(e) {
			return ks(e) ? {
				lastTime: 0,
				lastSequence: 0,
				fromAccount: 0,
				messageForShow: "",
				payload: null,
				type: "",
				isRevoked: !1
			} : e instanceof _h ? {
				lastTime: e.time || 0,
				lastSequence: e.sequence || 0,
				fromAccount: e.from || "",
				messageForShow: ay(e.type, e.payload),
				payload: e.payload || null,
				type: e.type || null,
				isRevoked: !1
			} : Dn(Dn({}, e), {}, {
				isRevoked: !1,
				messageForShow: ay(e.type, e.payload)
			})
		},
		uy = function() {
			function e(t) {
				In(this, e), this.conversationID = t.conversationID || "", this.unreadCount = t.unreadCount ||
					0, this.type = t.type || "", this.lastMessage = sy(t.lastMessage), t.lastMsgTime && (this
						.lastMessage.lastTime = t.lastMsgTime), this._isInfoCompleted = !1, this.peerReadTime =
					t.peerReadTime || 0, this.groupAtInfoList = [], this._initProfile(t)
			}
			return En(e, [{
				key: "toAccount",
				get: function() {
					return this.conversationID.replace("C2C", "").replace("GROUP", "")
				}
			}, {
				key: "subType",
				get: function() {
					return this.groupProfile ? this.groupProfile.type : ""
				}
			}, {
				key: "_initProfile",
				value: function(e) {
					var t = this;
					Object.keys(e).forEach((function(n) {
							switch (n) {
								case "userProfile":
									t.userProfile = e.userProfile;
									break;
								case "groupProfile":
									t.groupProfile = e.groupProfile
							}
						})), ks(this.userProfile) && this.type === _n.CONV_C2C ? this
						.userProfile = new Kv({
							userID: e.conversationID.replace("C2C", "")
						}) : ks(this.groupProfile) && this.type === _n.CONV_GROUP && (this
							.groupProfile = new iy({
								groupID: e.conversationID.replace("GROUP", "")
							}))
				}
			}, {
				key: "updateUnreadCount",
				value: function(e, t) {
					ks(e) || (Ys(this.subType) || Js(this.subType) ? this.unreadCount = 0 : t &&
						this.type === _n.CONV_GROUP ? this.unreadCount = e : this
						.unreadCount = this.unreadCount + e)
				}
			}, {
				key: "updateLastMessage",
				value: function(e) {
					this.lastMessage = sy(e)
				}
			}, {
				key: "updateGroupAtInfoList",
				value: function(e) {
					var t, n = (xn(t = e.groupAtType) || Fn(t) || Vn(t) || jn()).slice(0); - 1
						!== n.indexOf(_n.CONV_AT_ME) && -1 !== n.indexOf(_n.CONV_AT_ALL) && (
							n = [_n.CONV_AT_ALL_AT_ME]);
					var r = {
						from: e.from,
						groupID: e.groupID,
						messageSequence: e.sequence,
						atTypeArray: n,
						__random: e.__random,
						__sequence: e.__sequence
					};
					this.groupAtInfoList.push(r), Ms.debug(
						"Conversation.updateGroupAtInfoList conversationID=".concat(this
							.conversationID), this.groupAtInfoList)
				}
			}, {
				key: "clearGroupAtInfoList",
				value: function() {
					this.groupAtInfoList.length = 0
				}
			}, {
				key: "reduceUnreadCount",
				value: function() {
					this.unreadCount >= 1 && (this.unreadCount -= 1)
				}
			}, {
				key: "isLastMessageRevoked",
				value: function(e) {
					var t = e.sequence,
						n = e.time;
					return this.type === _n.CONV_C2C && t === this.lastMessage.lastSequence &&
						n === this.lastMessage.lastTime || this.type === _n.CONV_GROUP && t ===
						this.lastMessage.lastSequence
				}
			}, {
				key: "setLastMessageRevoked",
				value: function(e) {
					this.lastMessage.isRevoked = e
				}
			}]), e
		}(),
		cy = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e)).pagingStatus = Zu.NOT_START, r.pagingTimeStamp = 0, r
					.conversationMap = new Map, r.tempGroupList = [], r.tempGroupAtTipsList = [], r
					._initListeners(), r
			}
			return En(n, [{
				key: "hasLocalConversationMap",
				value: function() {
					return this.conversationMap.size > 0
				}
			}, {
				key: "_createLocalConversation",
				value: function(e) {
					return this.conversationMap.has(e) ? this.conversationMap.get(e) : (Ms.log(
						"ConversationController._createLocalConversation conversationID:"
						.concat(e)), new uy({
						conversationID: e,
						type: e.slice(0, 3) === _n.CONV_C2C ? _n.CONV_C2C : _n
							.CONV_GROUP
					}))
				}
			}, {
				key: "hasLocalConversation",
				value: function(e) {
					return this.conversationMap.has(e)
				}
			}, {
				key: "getConversationList",
				value: function() {
					var e = this;
					Ms.log("ConversationController.getConversationList."), this.pagingStatus ===
						Zu.REJECTED && (Ms.log(
							"ConversationController.getConversationList. continue to sync conversationList"
							), this._syncConversationList());
					var t = new hg(Pg);
					return this.request({
						name: "conversation",
						action: "query"
					}).then((function(n) {
						var r = n.data.conversations,
							o = void 0 === r ? [] : r,
							i = e._getConversationOptions(o);
						return e._updateLocalConversationList(i, !0), e
							._setStorageConversationList(), e
							._handleC2CPeerReadTime(), t.setText(o.length)
							.setNetworkType(e.getNetworkType()).setEnd(), Ms.log(
								"ConversationController.getConversationList ok."),
							Jd({
								conversationList: e.getLocalConversationList()
							})
					})).catch((function(n) {
						return e.probeNetwork().then((function(e) {
							var r = Un(e, 2),
								o = r[0],
								i = r[1];
							t.setError(n, o, i).setEnd()
						})), Ms.error(
							"ConversationController.getConversationList error:",
							n), Xd(n)
					}))
				}
			}, {
				key: "_syncConversationList",
				value: function() {
					var e = this,
						t = new hg(xg);
					return this.pagingStatus === Zu.NOT_START && this.conversationMap.clear(),
						this._autoPagingSyncConversationList().then((function(n) {
							return e.pagingStatus = Zu.RESOLVED, e
								._setStorageConversationList(), e
								._handleC2CPeerReadTime(), t.setText("".concat(e
									.conversationMap.size)).setNetworkType(e
									.getNetworkType()).setEnd(), n
						})).catch((function(n) {
							return e.pagingStatus = Zu.REJECTED, t.setText(e
								.pagingTimeStamp), e.probeNetwork().then((function(
								e) {
								var r = Un(e, 2),
									o = r[0],
									i = r[1];
								t.setError(n, o, i).setEnd()
							})), Xd(n)
						}))
				}
			}, {
				key: "_autoPagingSyncConversationList",
				value: function() {
					var e = this;
					return this.pagingStatus = Zu.PENDING, this.request({
						name: "conversation",
						action: "pagingQuery",
						param: {
							fromAccount: this.tim.context.identifier,
							timeStamp: this.pagingTimeStamp,
							orderType: 1
						}
					}).then((function(t) {
						var n = t.data,
							r = n.completeFlag,
							o = n.conversations,
							i = void 0 === o ? [] : o,
							a = n.timeStamp;
						if (Ms.log(
								"ConversationController._autoPagingSyncConversationList completeFlag="
								.concat(r, " nums=").concat(i.length)), i.length >
							0) {
							var s = e._getConversationOptions(i);
							e._updateLocalConversationList(s, !0)
						}
						if (e._isReady) e._emitConversationUpdate();
						else {
							if (!e.isLoggedIn()) return Jd();
							e.triggerReady()
						}
						return e.pagingTimeStamp = a, 1 !== r ? e
							._autoPagingSyncConversationList() : (e
								._handleGroupAtTipsList(), Jd())
					})).catch((function(t) {
						throw e.isLoggedIn() && (e._isReady || (Ms.warn(
							"ConversationController._autoPagingSyncConversationList failed. error:"
							.concat(Gs(t))), e.triggerReady())), t
					}))
				}
			}, {
				key: "_handleC2CPeerReadTime",
				value: function() {
					var e, t = this.tim.messageController,
						n = Kn(this.conversationMap);
					try {
						for (n.s(); !(e = n.n()).done;) {
							var r = Un(e.value, 2),
								o = r[0],
								i = r[1];
							i.type === _n.CONV_C2C && (Ms.debug(
								"ConversationController._handleC2CPeerReadTime", o, i
								.peerReadTime), t.recordPeerReadTime(o, i.peerReadTime))
						}
					} catch (a) {
						n.e(a)
					} finally {
						n.f()
					}
				}
			}, {
				key: "getConversationProfile",
				value: function(e) {
					var t = this,
						n = this.conversationMap.has(e) ? this.conversationMap.get(e) : this
						._createLocalConversation(e);
					if (n._isInfoCompleted || n.type === _n.CONV_SYSTEM) return Jd({
						conversation: n
					});
					var r = new hg(Gg);
					return Ms.log(
							"ConversationController.getConversationProfile. conversationID:"
							.concat(e, " lastMessage:"), n.lastMessage), this
						._updateUserOrGroupProfileCompletely(n).then((function(n) {
							return r.setNetworkType(t.getNetworkType()).setText(
									"conversationID=".concat(e, " unreadCount=").concat(
										n.data.conversation.unreadCount)).setEnd(), Ms
								.log(
									"ConversationController.getConversationProfile ok. conversationID:",
									e), n
						})).catch((function(n) {
							return t.probeNetwork().then((function(t) {
								var o = Un(t, 2),
									i = o[0],
									a = o[1];
								r.setError(n, i, a).setText(
									"conversationID=".concat(e))
								.setEnd()
							})), Ms.error(
								"ConversationController.getConversationProfile error:",
								n), Xd(n)
						}))
				}
			}, {
				key: "deleteConversation",
				value: function(e) {
					var t = this,
						n = {};
					if (!this.conversationMap.has(e)) {
						var r = new Vp({
							code: Bp.CONVERSATION_NOT_FOUND,
							message: Cf
						});
						return Xd(r)
					}
					switch (this.conversationMap.get(e).type) {
						case _n.CONV_C2C:
							n.type = 1, n.toAccount = e.replace(_n.CONV_C2C, "");
							break;
						case _n.CONV_GROUP:
							n.type = 2, n.toGroupID = e.replace(_n.CONV_GROUP, "");
							break;
						case _n.CONV_SYSTEM:
							return this.tim.groupController.deleteGroupSystemNotice({
								messageList: this.tim.messageController
									.getLocalMessageList(e)
							}), this.deleteLocalConversation(e), Jd({
								conversationID: e
							});
						default:
							var o = new Vp({
								code: Bp.CONVERSATION_UN_RECORDED_TYPE,
								message: Sf
							});
							return Xd(o)
					}
					var i = new hg(Ug);
					return i.setText("conversationID=".concat(e)), Ms.log(
						"ConversationController.deleteConversation. conversationID=".concat(
							e)), this.tim.setMessageRead({
						conversationID: e
					}).then((function() {
						return t.request({
							name: "conversation",
							action: "delete",
							param: n
						})
					})).then((function() {
						return i.setNetworkType(t.getNetworkType()).setEnd(), Ms
							.log("ConversationController.deleteConversation ok."), t
							.deleteLocalConversation(e), Jd({
								conversationID: e
							})
					})).catch((function(e) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								r = n[0],
								o = n[1];
							i.setError(e, r, o).setEnd()
						})), Ms.error(
							"ConversationController.deleteConversation error:",
							e), Xd(e)
					}))
				}
			}, {
				key: "getLocalConversationList",
				value: function() {
					return qn(this.conversationMap.values())
				}
			}, {
				key: "getLocalConversation",
				value: function(e) {
					return this.conversationMap.get(e)
				}
			}, {
				key: "_initLocalConversationList",
				value: function() {
					var e = new hg(qg);
					Ms.time(lg), Ms.log("ConversationController._initLocalConversationList.");
					var t = this._getStorageConversationList();
					if (t) {
						for (var n = t.length, r = 0; r < n; r++) this.conversationMap.set(t[r]
							.conversationID, new uy(t[r]));
						this._emitConversationUpdate(!0, !1), e.setNetworkType(this
							.getNetworkType()).setText(n).setEnd()
					} else e.setNetworkType(this.getNetworkType()).setText(0).setEnd();
					this._syncConversationList()
				}
			}, {
				key: "_getStorageConversationList",
				value: function() {
					return this.tim.storage.getItem("conversationMap")
				}
			}, {
				key: "_setStorageConversationList",
				value: function() {
					var e = this.getLocalConversationList().slice(0, 20).map((function(e) {
						return {
							conversationID: e.conversationID,
							type: e.type,
							subType: e.subType,
							lastMessage: e.lastMessage,
							groupProfile: e.groupProfile,
							userProfile: e.userProfile
						}
					}));
					this.tim.storage.setItem("conversationMap", e)
				}
			}, {
				key: "_initListeners",
				value: function() {
					var e = this;
					this.tim.innerEmitter.once(Bh, this._initLocalConversationList, this), this
						.tim.innerEmitter.on($h, this._onSendOrReceiveMessage, this), this.tim
						.innerEmitter.on(zh, this._handleSyncMessages, this), this.tim
						.innerEmitter.on(Wh, this._handleSyncMessages, this), this.tim
						.innerEmitter.on(Yh, this._onSendOrReceiveMessage, this), this.tim
						.innerEmitter.on(Jh, this._onSendOrReceiveMessage, this), this.tim
						.innerEmitter.on(Xh, this._onSendOrReceiveMessage, this), this.tim
						.innerEmitter.on(yd, this._onGroupListUpdated, this), this.tim
						.innerEmitter.on(kd, this._updateConversationUserProfile, this), this
						.tim.innerEmitter.on(Qh, this._onMessageRevoked, this), this.tim
						.innerEmitter.on(sd, this._onReceiveGroupAtTips, this), this.ready((
							function() {
								e.tempGroupList.length > 0 && (e
									._updateConversationGroupProfile(e.tempGroupList), e
									.tempGroupList.length = 0)
							}))
				}
			}, {
				key: "_onGroupListUpdated",
				value: function(e) {
					this._updateConversationGroupProfile(e.data)
				}
			}, {
				key: "_updateConversationGroupProfile",
				value: function(e) {
					var t = this;
					Ds(e) && 0 === e.length || (this.hasLocalConversationMap() ? (e.forEach((
							function(e) {
								var n = "GROUP".concat(e.groupID);
								if (t.conversationMap.has(n)) {
									var r = t.conversationMap.get(n);
									r.groupProfile = e, r.lastMessage.lastSequence <
										e.nextMessageSeq && (r.lastMessage
											.lastSequence = e.nextMessageSeq - 1), r
										.subType || (r.subType = e.type)
								}
							})), this._emitConversationUpdate(!0, !1)) : this
						.tempGroupList = e)
				}
			}, {
				key: "_updateConversationUserProfile",
				value: function(e) {
					var t = this;
					e.data.forEach((function(e) {
						var n = "C2C".concat(e.userID);
						t.conversationMap.has(n) && (t.conversationMap.get(n)
							.userProfile = e)
					})), this._emitConversationUpdate(!0, !1)
				}
			}, {
				key: "updateUserProfileSpecifiedKey",
				value: function(e) {
					Ms.log("ConversationController.updateUserProfileSpecifiedKey options:", e);
					var t = e.conversationID,
						n = e.nick,
						r = e.avatar;
					if (this.conversationMap.has(t)) {
						var o = this.conversationMap.get(t).userProfile;
						Es(n) && o.nick !== n && (o.nick = n), Es(r) && o.avatar !== r && (o
							.avatar = r), this._emitConversationUpdate(!0, !1)
					}
				}
			}, {
				key: "_onMessageRevoked",
				value: function(e) {
					var t = this,
						n = e.data;
					if (0 !== n.length) {
						var r = null,
							o = !1;
						n.forEach((function(e) {
							(r = t.conversationMap.get(e.conversationID)) && r
								.isLastMessageRevoked(e) && (o = !0, r
									.setLastMessageRevoked(!0))
						})), o && this._emitConversationUpdate(!0, !1)
					}
				}
			}, {
				key: "_onReceiveGroupAtTips",
				value: function(e) {
					var t = this,
						n = e.data,
						r = null;
					n.forEach((function(e) {
							e.groupAtTips ? r = e.groupAtTips : e.elements && (r = e
									.elements), r.__random = e.random, r.__sequence = e
								.clientSequence, t.tempGroupAtTipsList.push(r)
						})), Ms.debug("ConversationController._onReceiveGroupAtTips isReady="
							.concat(this._isReady), this.tempGroupAtTipsList), this._isReady &&
						this._handleGroupAtTipsList()
				}
			}, {
				key: "_handleGroupAtTipsList",
				value: function() {
					var e = this;
					if (0 !== this.tempGroupAtTipsList.length) {
						var t = !1;
						this.tempGroupAtTipsList.forEach((function(n) {
								var r = n.groupID;
								if (n.from !== e.tim.context.identifier) {
									var o = e.conversationMap.get("".concat(_n
										.CONV_GROUP).concat(r));
									o && (o.updateGroupAtInfoList(n), t = !0)
								}
							})), t && this._emitConversationUpdate(!0, !1), this
							.tempGroupAtTipsList.length = 0
					}
				}
			}, {
				key: "deleteGroupAtTips",
				value: function(e) {
					Ms.log("ConversationController.deleteGroupAtTips");
					var t = this.conversationMap.get(e);
					if (!t) return Promise.resolve();
					var n = t.groupAtInfoList;
					if (0 === n.length) return Promise.resolve();
					var r = this.tim.context.identifier;
					return this.request({
						name: "conversation",
						action: "deleteGroupAtTips",
						param: {
							messageListToDelete: n.map((function(e) {
								return {
									from: e.from,
									to: r,
									messageSeq: e.__sequence,
									messageRandom: e.__random,
									groupID: e.groupID
								}
							}))
						}
					}).then((function() {
						return Ms.log(
								"ConversationController.deleteGroupAtTips ok. nums="
								.concat(n.length)), t.clearGroupAtInfoList(),
							Promise.resolve()
					})).catch((function(e) {
						return Ms.error(
							"ConversationController.deleteGroupAtTips error:", e
							), Xd(e)
					}))
				}
			}, {
				key: "_handleSyncMessages",
				value: function(e) {
					this._onSendOrReceiveMessage(e, !0)
				}
			}, {
				key: "_onSendOrReceiveMessage",
				value: function(e) {
					var t = this,
						n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
						r = e.data.eventDataList;
					this._isReady ? 0 !== r.length && (this._getPeerReadTime(r), this
							._updateLocalConversationList(r, !1, n), this
							._setStorageConversationList(), this._emitConversationUpdate()) :
						this.ready((function() {
							t._onSendOrReceiveMessage(e, n)
						}))
				}
			}, {
				key: "_getPeerReadTime",
				value: function(e) {
					var t = this,
						n = [];
					e.forEach((function(e) {
						t.conversationMap.has(e.conversationID) || e.type !== _n
							.CONV_C2C || n.push(e.conversationID.replace(_n
								.CONV_C2C, ""))
					})), n.length > 0 && (Ms.debug(
							"ConversationController._getPeerReadTime userIDList:".concat(n)
							), this.tim.messageController.getPeerReadTime(n))
				}
			}, {
				key: "_updateLocalConversationList",
				value: function(e, t, n) {
					var r;
					r = this._updateTempConversations(e, t, n), this.conversationMap = new Map(
						this._sortConversations([].concat(qn(r.conversations), qn(this
							.conversationMap)))), t || this._updateUserOrGroupProfile(r
						.newerConversations)
				}
			}, {
				key: "_updateTempConversations",
				value: function(e, t, n) {
					for (var r = [], o = [], i = 0, a = e.length; i < a; i++) {
						var s = new uy(e[i]),
							u = this.conversationMap.get(s.conversationID);
						if (this.conversationMap.has(s.conversationID)) {
							var c = ["unreadCount", "allowType", "adminForbidType", "payload"];
							n && c.push("lastMessage"), Ps(u, s, c, [null, void 0, "", 0, NaN]),
								u.updateUnreadCount(s.unreadCount, t), n || (u.lastMessage
									.payload = e[i].lastMessage.payload), this.conversationMap
								.delete(u.conversationID), r.push([u.conversationID, u])
						} else {
							if (s.type === _n.CONV_GROUP) {
								var l = s.groupProfile.groupID,
									p = this.tim.groupController.getLocalGroupProfile(l);
								p && (s.groupProfile = p, s.updateUnreadCount(0))
							}
							o.push(s), r.push([s.conversationID, s])
						}
					}
					return {
						conversations: r,
						newerConversations: o
					}
				}
			}, {
				key: "_sortConversations",
				value: function(e) {
					return e.sort((function(e, t) {
						return t[1].lastMessage.lastTime - e[1].lastMessage.lastTime
					}))
				}
			}, {
				key: "_updateUserOrGroupProfile",
				value: function(e) {
					var t = this;
					if (0 !== e.length) {
						var n = [],
							r = [];
						e.forEach((function(e) {
								if (e.type === _n.CONV_C2C) n.push(e.toAccount);
								else if (e.type === _n.CONV_GROUP) {
									var o = e.toAccount;
									t.tim.groupController.hasLocalGroup(o) ? e
										.groupProfile = t.tim.groupController
										.getLocalGroupProfile(o) : r.push(o)
								}
							})), n.length > 0 && this.tim.getUserProfile({
								userIDList: n
							}).then((function(e) {
								var n = e.data;
								Ds(n) ? n.forEach((function(e) {
										t.conversationMap.get("C2C".concat(e
											.userID)).userProfile = e
									})) : t.conversationMap.get("C2C".concat(n.userID))
									.userProfile = n
							})), r.length > 0 && this.tim.groupController
							.getGroupProfileAdvance({
								groupIDList: r,
								responseFilter: {
									groupBaseInfoFilter: ["Type", "Name", "FaceUrl"]
								}
							}).then((function(e) {
								e.data.successGroupList.forEach((function(e) {
									var n = "GROUP".concat(e.groupID);
									if (t.conversationMap.has(n)) {
										var r = t.conversationMap.get(n);
										Ps(r.groupProfile, e, [], [null,
											void 0, "", 0, NaN
										]), !r.subType && e.type && (r
											.subType = e.type)
									}
								}))
							}))
					}
				}
			}, {
				key: "_updateUserOrGroupProfileCompletely",
				value: function(e) {
					var t = this;
					return e.type === _n.CONV_C2C ? this.tim.getUserProfile({
						userIDList: [e.toAccount]
					}).then((function(n) {
						var r = n.data;
						return 0 === r.length ? Xd(new Vp({
							code: Bp.USER_OR_GROUP_NOT_FOUND,
							message: Ef
						})) : (e.userProfile = r[0], e._isInfoCompleted = !0, t
							._unshiftConversation(e), Jd({
								conversation: e
							}))
					})) : this.tim.getGroupProfile({
						groupID: e.toAccount
					}).then((function(n) {
						return e.groupProfile = n.data.group, e._isInfoCompleted = !
							0, t._unshiftConversation(e), Jd({
								conversation: e
							})
					}))
				}
			}, {
				key: "_unshiftConversation",
				value: function(e) {
					e instanceof uy && !this.conversationMap.has(e.conversationID) && (this
						.conversationMap = new Map([
							[e.conversationID, e]
						].concat(qn(this.conversationMap))), this
						._setStorageConversationList(), this._emitConversationUpdate(!0, !1)
						)
				}
			}, {
				key: "deleteLocalConversation",
				value: function(e) {
					this.conversationMap.delete(e), this._setStorageConversationList(), this
						.emitInnerEvent(Dd, e), this._emitConversationUpdate(!0, !1)
				}
			}, {
				key: "_getConversationOptions",
				value: function(e) {
					var t = [],
						n = e.filter((function(e) {
							var t = e.lastMsg;
							return Ts(t)
						})).map((function(e) {
							if (1 === e.type) {
								var n = {
									userID: e.userID,
									nick: e.c2CNick,
									avatar: e.c2CImage
								};
								return t.push(n), {
									conversationID: "C2C".concat(e.userID),
									type: "C2C",
									lastMessage: {
										lastTime: e.time,
										lastSequence: e.sequence,
										fromAccount: e.lastC2CMsgFromAccount,
										messageForShow: e.messageShow,
										type: e.lastMsg.elements[0] ? e.lastMsg
											.elements[0].type : null,
										payload: e.lastMsg.elements[0] ? e.lastMsg
											.elements[0].content : null
									},
									userProfile: new Kv(n),
									peerReadTime: e.c2cPeerReadTime
								}
							}
							return {
								conversationID: "GROUP".concat(e.groupID),
								type: "GROUP",
								lastMessage: {
									lastTime: e.time,
									lastSequence: e.messageReadSeq + e.unreadCount,
									fromAccount: e.msgGroupFromAccount,
									messageForShow: e.messageShow,
									type: e.lastMsg.elements[0] ? e.lastMsg.elements[0]
										.type : null,
									payload: e.lastMsg.elements[0] ? e.lastMsg.elements[
										0].content : null
								},
								groupProfile: new iy({
									groupID: e.groupID,
									name: e.groupNick,
									avatar: e.groupImage
								}),
								unreadCount: e.unreadCount,
								peerReadTime: 0
							}
						}));
					return t.length > 0 && this.emitInnerEvent(Td, t), n
				}
			}, {
				key: "_emitConversationUpdate",
				value: function() {
					var e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0],
						t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1],
						n = qn(this.conversationMap.values());
					t && this.emitInnerEvent(Sd, n), e && this.emitOuterEvent(yn
						.CONVERSATION_LIST_UPDATED, n)
				}
			}, {
				key: "_conversationMapTreeShaking",
				value: function(e) {
					var t = this,
						n = new Map(qn(this.conversationMap));
					e.forEach((function(e) {
						return n.delete(e.conversationID)
					})), n.has(_n.CONV_SYSTEM) && n.delete(_n.CONV_SYSTEM);
					var r = this.tim.groupController.getJoinedAVChatRoom();
					r && r.forEach((function(e) {
						n.delete("".concat(_n.CONV_GROUP).concat(e))
					})), qn(n.keys()).forEach((function(e) {
						return t.conversationMap.delete(e)
					}))
				}
			}, {
				key: "reset",
				value: function() {
					this.pagingStatus = Zu.NOT_START, this.pagingTimeStamp = 0, this
						.conversationMap.clear(), this.tempGroupAtTipsList.length = 0, this
						.resetReady(), this.tim.innerEmitter.once(Bh, this
							._initLocalConversationList, this)
				}
			}]), n
		}(Kd),
		ly = [].push,
		py = Math.min,
		fy = !o((function() {
			return !RegExp(4294967295, "y")
		}));
	Yr("split", 2, (function(e, t, n) {
		var r;
		return r = "c" == "abbc".split(/(b)*/)[1] || 4 != "test".split(/(?:)/, -1).length || 2 !=
			"ab".split(/(?:ab)*/).length || 4 != ".".split(/(.?)(.?)/).length || ".".split(/()()/)
			.length > 1 || "".split(/.?/).length ? function(e, n) {
				var r = String(d(this)),
					o = void 0 === n ? 4294967295 : n >>> 0;
				if (0 === o) return [];
				if (void 0 === e) return [r];
				if (!oo(e)) return t.call(r, e, o);
				for (var i, a, s, u = [], c = (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") +
						(e.unicode ? "u" : "") + (e.sticky ? "y" : ""), l = 0, p = new RegExp(e
							.source, c + "g");
					(i = Br.call(p, r)) && !((a = p.lastIndex) > l && (u.push(r.slice(l, i.index)),
						i.length > 1 && i.index < r.length && ly.apply(u, i.slice(1)), s = i[0]
						.length, l = a, u.length >= o));) p.lastIndex === i.index && p.lastIndex++;
				return l === r.length ? !s && p.test("") || u.push("") : u.push(r.slice(l)), u
					.length > o ? u.slice(0, o) : u
			} : "0".split(void 0, 0).length ? function(e, n) {
				return void 0 === e && 0 === n ? [] : t.call(this, e, n)
			} : t, [function(t, n) {
				var o = d(this),
					i = null == t ? void 0 : t[e];
				return void 0 !== i ? i.call(t, o, n) : r.call(String(o), t, n)
			}, function(e, o) {
				var i = n(r, e, this, o, r !== t);
				if (i.done) return i.value;
				var a = D(e),
					s = String(this),
					u = gi(a, RegExp),
					c = a.unicode,
					l = (a.ignoreCase ? "i" : "") + (a.multiline ? "m" : "") + (a.unicode ?
						"u" : "") + (fy ? "y" : "g"),
					p = new u(fy ? a : "^(?:" + a.source + ")", l),
					f = void 0 === o ? 4294967295 : o >>> 0;
				if (0 === f) return [];
				if (0 === s.length) return null === Qr(p, s) ? [s] : [];
				for (var h = 0, d = 0, g = []; d < s.length;) {
					p.lastIndex = fy ? d : 0;
					var m, v = Qr(p, fy ? s : s.slice(d));
					if (null === v || (m = py(ue(p.lastIndex + (fy ? 0 : d)), s.length)) === h)
						d = Xr(s, d, c);
					else {
						if (g.push(s.slice(h, d)), g.length === f) return g;
						for (var y = 1; y <= v.length - 1; y++)
							if (g.push(v[y]), g.length === f) return g;
						d = h = m
					}
				}
				return g.push(s.slice(h)), g
			}]
	}), !fy);
	var hy = 1..toFixed,
		dy = Math.floor,
		gy = function(e, t, n) {
			return 0 === t ? n : t % 2 == 1 ? gy(e, t - 1, n * e) : gy(e * e, t / 2, n)
		},
		vy = function(e, t, n) {
			for (var r = -1, o = n; ++r < 6;) o += t * e[r], e[r] = o % 1e7, o = dy(o / 1e7)
		},
		yy = function(e, t) {
			for (var n = 6, r = 0; --n >= 0;) r += e[n], e[n] = dy(r / t), r = r % t * 1e7
		},
		_y = function(e) {
			for (var t = 6, n = ""; --t >= 0;)
				if ("" !== n || 0 === t || 0 !== e[t]) {
					var r = String(e[t]);
					n = "" === n ? r : n + uo.call("0", 7 - r.length) + r
				} return n
		},
		My = hy && ("0.000" !== 8e-5.toFixed(3) || "1" !== .9.toFixed(0) || "1.25" !== 1.255.toFixed(2) ||
			"1000000000000000128" !== (0xde0b6b3a7640080).toFixed(0)) || !o((function() {
			hy.call({})
		}));
	Re({
		target: "Number",
		proto: !0,
		forced: My
	}, {
		toFixed: function(e) {
			var t, n, r, o, i = function(e) {
					if ("number" != typeof e && "Number" != p(e)) throw TypeError(
						"Incorrect invocation");
					return +e
				}(this),
				a = ae(e),
				s = [0, 0, 0, 0, 0, 0],
				u = "",
				c = "0";
			if (a < 0 || a > 20) throw RangeError("Incorrect fraction digits");
			if (i != i) return "NaN";
			if (i <= -1e21 || i >= 1e21) return String(i);
			if (i < 0 && (u = "-", i = -i), i > 1e-21)
				if (n = (t = function(e) {
						for (var t = 0, n = e; n >= 4096;) t += 12, n /= 4096;
						for (; n >= 2;) t += 1, n /= 2;
						return t
					}(i * gy(2, 69, 1)) - 69) < 0 ? i * gy(2, -t, 1) : i / gy(2, t, 1), n *=
					4503599627370496, (t = 52 - t) > 0) {
					for (vy(s, 0, n), r = a; r >= 7;) vy(s, 1e7, 0), r -= 7;
					for (vy(s, gy(10, r, 1), 0), r = t - 1; r >= 23;) yy(s, 1 << 23), r -= 23;
					yy(s, 1 << r), vy(s, 1, 1), yy(s, 2), c = _y(s)
				} else vy(s, 0, n), vy(s, 1 << -t, 0), c = _y(s) + uo.call("0", a);
			return c = a > 0 ? u + ((o = c.length) <= a ? "0." + uo.call("0", a - o) + c : c.slice(
				0, o - a) + "." + c.slice(o - a)) : u + c
		}
	});
	var Iy = function() {
			function e(t) {
				if (In(this, e), void 0 === t) throw new Vp({
					code: Bp.MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS,
					message: Zp
				});
				if (void 0 === t.tim) throw new Vp({
					code: Bp.MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS,
					message: "".concat(Zp, ".tim")
				});
				this.list = new Map, this._latestMessageSentByPeerMap = new Map, this
					._latestMessageSentByMeMap = new Map, this.tim = t.tim, this._initializeOptions(t)
			}
			return En(e, [{
				key: "getLocalOldestMessageByConversationID",
				value: function(e) {
					if (!e) return null;
					if (!this.list.has(e)) return null;
					var t = this.list.get(e).values();
					return t ? t.next().value : null
				}
			}, {
				key: "_initializeOptions",
				value: function(e) {
					this.options = {};
					var t = {
						memory: {
							maxDatasPerKey: 100,
							maxBytesPerData: 256,
							maxKeys: 0
						},
						cache: {
							maxDatasPerKey: 10,
							maxBytesPerData: 256,
							maxKeys: 0
						}
					};
					for (var n in t)
						if (Object.prototype.hasOwnProperty.call(t, n)) {
							if (void 0 === e[n]) {
								this.options[n] = t[n];
								continue
							}
							var r = t[n];
							for (var o in r)
								if (Object.prototype.hasOwnProperty.call(r, o)) {
									if (void 0 === e[n][o]) {
										this.options[n][o] = r[o];
										continue
									}
									this.options[n][o] = e[n][o]
								}
						}
				}
			}, {
				key: "pushIn",
				value: function(e) {
					var t = e.conversationID,
						n = e.ID,
						r = !0;
					return this.list.has(t) || this.list.set(t, new Map), this.list.has(t) &&
						this.list.get(t).has(n) ? r = !1 : (this.list.get(t).set(n, e), this
							._setLatestMessageSentByPeer(t, e), this._setLatestMessageSentByMe(
								t, e)), r
				}
			}, {
				key: "unshift",
				value: function(e) {
					var t;
					if (Ds(e) ? e.length > 0 && (t = e[0].conversationID, this
							._unshiftMultipleMessages(e)) : (t = e.conversationID, this
							._unshiftSingleMessage(e)), t && t.startsWith(_n.CONV_C2C)) {
						var n = Array.from(this.list.get(t).values()),
							r = n.length;
						if (0 === r) return;
						for (var o = r - 1; o >= 0; o--)
							if ("out" === n[o].flow) {
								this._setLatestMessageSentByMe(t, n[o]);
								break
							} for (var i = r - 1; i >= 0; i--)
							if ("in" === n[i].flow) {
								this._setLatestMessageSentByPeer(t, n[i]);
								break
							}
					}
				}
			}, {
				key: "_unshiftSingleMessage",
				value: function(e) {
					var t = e.conversationID,
						n = e.ID;
					if (!this.list.has(t)) return this.list.set(t, new Map), void this.list.get(
						t).set(n, e);
					var r = Array.from(this.list.get(t));
					r.unshift([n, e]), this.list.set(t, new Map(r))
				}
			}, {
				key: "_unshiftMultipleMessages",
				value: function(e) {
					for (var t = e.length, n = [], r = e[0].conversationID, o = this.list.has(
							r) ? Array.from(this.list.get(r)) : [], i = 0; i < t; i++) n.push([
						e[i].ID, e[i]
					]);
					this.list.set(r, new Map(n.concat(o)))
				}
			}, {
				key: "remove",
				value: function(e) {
					var t = e.conversationID,
						n = e.ID;
					this.list.has(t) && this.list.get(t).delete(n)
				}
			}, {
				key: "revoke",
				value: function(e, t, n) {
					if (Ms.debug("revoke message", e, t, n), this.list.has(e)) {
						var r, o = Kn(this.list.get(e));
						try {
							for (o.s(); !(r = o.n()).done;) {
								var i = Un(r.value, 2)[1];
								if (i.sequence === t && !i.isRevoked && (ks(n) || i.random ===
										n)) return i.isRevoked = !0, i
							}
						} catch (a) {
							o.e(a)
						} finally {
							o.f()
						}
					}
					return null
				}
			}, {
				key: "removeByConversationID",
				value: function(e) {
					this.list.has(e) && (this.list.delete(e), this._latestMessageSentByPeerMap
						.delete(e), this._latestMessageSentByMeMap.delete(e))
				}
			}, {
				key: "updateMessageIsPeerReadProperty",
				value: function(e, t) {
					var n = [];
					if (this.list.has(e)) {
						var r, o = Kn(this.list.get(e));
						try {
							for (o.s(); !(r = o.n()).done;) {
								var i = Un(r.value, 2)[1];
								i.time <= t && !i.isPeerRead && "out" === i.flow && (i
									.isPeerRead = !0, n.push(i))
							}
						} catch (a) {
							o.e(a)
						} finally {
							o.f()
						}
						Ms.log("MessagesList.updateMessageIsPeerReadProperty conversationID="
							.concat(e, " peerReadTime=").concat(t, " count=").concat(n
								.length))
					}
					return n
				}
			}, {
				key: "hasLocalMessageList",
				value: function(e) {
					return this.list.has(e)
				}
			}, {
				key: "getLocalMessageList",
				value: function(e) {
					return this.hasLocalMessageList(e) ? qn(this.list.get(e).values()) : []
				}
			}, {
				key: "hasLocalMessage",
				value: function(e, t) {
					return !!this.hasLocalMessageList(e) && this.list.get(e).has(t)
				}
			}, {
				key: "getLocalMessage",
				value: function(e, t) {
					return this.hasLocalMessage(e, t) ? this.list.get(e).get(t) : null
				}
			}, {
				key: "_setLatestMessageSentByPeer",
				value: function(e, t) {
					e.startsWith(_n.CONV_C2C) && "in" === t.flow && this
						._latestMessageSentByPeerMap.set(e, t)
				}
			}, {
				key: "_setLatestMessageSentByMe",
				value: function(e, t) {
					e.startsWith(_n.CONV_C2C) && "out" === t.flow && this
						._latestMessageSentByMeMap.set(e, t)
				}
			}, {
				key: "getLatestMessageSentByPeer",
				value: function(e) {
					return this._latestMessageSentByPeerMap.get(e)
				}
			}, {
				key: "getLatestMessageSentByMe",
				value: function(e) {
					return this._latestMessageSentByMeMap.get(e)
				}
			}, {
				key: "modifyMessageSentByPeer",
				value: function(e) {
					var t = this.list.get(e);
					if (!ou(t)) {
						var n = Array.from(t.values()),
							r = n.length;
						if (0 !== r) {
							for (var o = null, i = null, a = 0, s = !1, u = r - 1; u >= 0; u--)
								"in" === n[u].flow && (null === i ? i = n[u] : ((o = n[u])
									.nick !== i.nick && (o.setNickAndAvatar({
										nick: i.nick
									}), s = !0), o.avatar !== i.avatar && (o
										.setNickAndAvatar({
											avatar: i.avatar
										}), s = !0), s && (a += 1)));
							Ms.log("MessagesList.modifyMessageSentByPeer conversationID="
								.concat(e, " count=").concat(a))
						}
					}
				}
			}, {
				key: "modifyMessageSentByMe",
				value: function(e) {
					var t = e.conversationID,
						n = e.latestNick,
						r = e.latestAvatar,
						o = this.list.get(t);
					if (!ou(o)) {
						var i = Array.from(o.values()),
							a = i.length;
						if (0 !== a) {
							for (var s = null, u = 0, c = !1, l = a - 1; l >= 0; l--) "out" ===
								i[l].flow && ((s = i[l]).nick !== n && (s.setNickAndAvatar({
									nick: n
								}), c = !0), s.avatar !== r && (s.setNickAndAvatar({
									avatar: r
								}), c = !0), c && (u += 1));
							Ms.log("MessagesList.modifyMessageSentByMe conversationID=".concat(
								t, " count=").concat(u))
						}
					}
				}
			}, {
				key: "reset",
				value: function() {
					this.list.clear(), this._latestMessageSentByPeerMap.clear(), this
						._latestMessageSentByMeMap.clear()
				}
			}]), e
		}(),
		Cy = function() {
			function e(t) {
				In(this, e), this.tim = t
			}
			return En(e, [{
				key: "setMessageRead",
				value: function(e) {
					var t = e.conversationID,
						n = e.messageID,
						r = this.tim.conversationController,
						o = r.getLocalConversation(t);
					if (Ms.log("ReadReportHandler.setMessageRead conversationID=".concat(t,
							" unreadCount=").concat(o ? o.unreadCount : 0)), !o) return Jd();
					if (o.type !== _n.CONV_GROUP || ou(o.groupAtInfoList) || r
						.deleteGroupAtTips(t), 0 === o.unreadCount) return Jd();
					var i = n ? this.tim.messageController.getLocalMessage(t, n) : null;
					switch (o.type) {
						case _n.CONV_C2C:
							return this._setC2CMessageRead({
								conversationID: t,
								lastMessageTime: i ? i.time : o.lastMessage.lastTime
							});
						case _n.CONV_GROUP:
							return this._setGroupMessageRead({
								conversationID: t,
								lastMessageSeq: i ? i.sequence : o.lastMessage
									.lastSequence
							});
						case _n.CONV_SYSTEM:
							return o.unreadCount = 0, Jd();
						default:
							return Jd()
					}
				}
			}, {
				key: "_setC2CMessageRead",
				value: function(e) {
					var t = this,
						n = e.conversationID,
						r = e.lastMessageTime;
					Ms.log("ReadReportHandler._setC2CMessageRead conversationID=".concat(n,
						" lastMessageTime=").concat(r)), Cs(r) || Ms.warn(
						"ReadReportHandler._setC2CMessageRead 请勿修改 Conversation.lastMessage.lastTime，否则可能会导致已读上报结果不准确"
						);
					var o = new hg(Og);
					return o.setText("".concat(n, "-").concat(r)), this.tim.messageController
						.request({
							name: "conversation",
							action: "setC2CMessageRead",
							param: {
								C2CMsgReaded: {
									cookie: "",
									C2CMsgReadedItem: [{
										toAccount: n.replace("C2C", ""),
										lastMessageTime: r,
										receipt: 1
									}]
								}
							}
						}).then((function() {
							return o.setNetworkType(t.tim.netMonitor.getNetworkType())
								.setEnd(), Ms.log(
									"ReadReportHandler._setC2CMessageRead ok."), t
								.updateIsReadAfterReadReport({
									conversationID: n,
									lastMessageTime: r
								}), t.updateUnreadCount(n), new zd
						})).catch((function(e) {
							return t.tim.netMonitor.probe().then((function(t) {
								var n = Un(t, 2),
									r = n[0],
									i = n[1];
								o.setError(e, r, i).setEnd()
							})), Ms.log(
								"ReadReportHandler._setC2CMessageRead failed. "
								.concat(Gs(e))), Xd(e)
						}))
				}
			}, {
				key: "_setGroupMessageRead",
				value: function(e) {
					var t = this,
						n = e.conversationID,
						r = e.lastMessageSeq;
					Ms.log("ReadReportHandler._setGroupMessageRead conversationID=".concat(n,
						" lastMessageSeq=").concat(r)), Cs(r) || Ms.warn(
						"ReadReportHandler._setGroupMessageRead 请勿修改 Conversation.lastMessage.lastSequence，否则可能会导致已读上报结果不准确"
						);
					var o = new hg(Rg);
					return o.setText("".concat(n, "-").concat(r)), this.tim.messageController
						.request({
							name: "conversation",
							action: "setGroupMessageRead",
							param: {
								groupID: n.replace("GROUP", ""),
								messageReadSeq: r
							}
						}).then((function() {
							return o.setNetworkType(t.tim.netMonitor.getNetworkType())
								.setEnd(), Ms.log(
									"ReadReportHandler._setGroupMessageRead ok."), t
								.updateIsReadAfterReadReport({
									conversationID: n,
									lastMessageSeq: r
								}), t.updateUnreadCount(n), new zd
						})).catch((function(e) {
							return t.tim.netMonitor.probe().then((function(t) {
								var n = Un(t, 2),
									r = n[0],
									i = n[1];
								o.setError(e, r, i).setEnd()
							})), Ms.log(
								"ReadReportHandler._setGroupMessageRead failed. "
								.concat(Gs(e))), Xd(e)
						}))
				}
			}, {
				key: "updateUnreadCount",
				value: function(e) {
					var t = this.tim,
						n = t.conversationController,
						r = t.messageController,
						o = n.getLocalConversation(e),
						i = r.getLocalMessageList(e);
					o && (o.unreadCount = i.filter((function(e) {
						return !e.isRead && !e.getOnlineOnlyFlag()
					})).length, Ms.log(
						"ReadReportHandler.updateUnreadCount conversationID=".concat(o
							.conversationID, " unreadCount=").concat(o.unreadCount)))
				}
			}, {
				key: "updateIsReadAfterReadReport",
				value: function(e) {
					var t = e.conversationID,
						n = e.lastMessageSeq,
						r = e.lastMessageTime,
						o = this.tim.messageController.getLocalMessageList(t);
					if (0 !== o.length)
						for (var i, a = o.length - 1; a >= 0; a--)
							if (i = o[a], !(r && i.time > r || n && i.sequence > n)) {
								if ("in" === i.flow && i.isRead) break;
								i.setIsRead(!0)
							}
				}
			}, {
				key: "updateIsRead",
				value: function(e) {
					var t = this.tim,
						n = t.conversationController,
						r = t.messageController,
						o = n.getLocalConversation(e),
						i = r.getLocalMessageList(e);
					if (o && 0 !== i.length && !Xs(o.type)) {
						for (var a = [], s = 0; s < i.length; s++) "in" !== i[s].flow ?
							"out" !== i[s].flow || i[s].isRead || i[s].setIsRead(!0) : a.push(i[
								s]);
						var u = 0;
						if (o.type === _n.CONV_C2C) {
							var c = a.slice(-o.unreadCount).filter((function(e) {
								return e.isRevoked
							})).length;
							u = a.length - o.unreadCount - c
						} else u = a.length - o.unreadCount;
						for (var l = 0; l < u && !a[l].isRead; l++) a[l].setIsRead(!0)
					}
				}
			}]), e
		}(),
		Ey = ut.findIndex,
		Sy = !0;
	"findIndex" in [] && Array(1).findIndex((function() {
		Sy = !1
	})), Re({
		target: "Array",
		proto: !0,
		forced: Sy
	}, {
		findIndex: function(e) {
			return Ey(this, e, arguments.length > 1 ? arguments[1] : void 0)
		}
	}), to("findIndex");
	var Ty = function() {
			function e(t) {
				var n = t.tim,
					r = t.messageController;
				In(this, e), this.tim = n, this.messageController = r, this.completedMap = new Map, this
					._initListener()
			}
			return En(e, [{
				key: "getMessageList",
				value: function(e) {
					var t = this,
						n = e.conversationID,
						r = e.nextReqMessageID,
						o = e.count;
					if (this.tim.groupController.checkJoinedAVChatRoomByID(n.replace("GROUP",
							""))) return Ms.log(
						"GetMessageHandler.getMessageList not available in avchatroom. conversationID="
						.concat(n)), Jd({
						messageList: [],
						nextReqMessageID: "",
						isCompleted: !0
					});
					(ks(o) || o > 15) && (o = 15);
					var i = this._computeLeftCount({
						conversationID: n,
						nextReqMessageID: r
					});
					return Ms.log("GetMessageHandler.getMessageList. conversationID=".concat(n,
						" leftCount=").concat(i, " count=").concat(o,
						" nextReqMessageID=").concat(r)), this._needGetHistory({
						conversationID: n,
						leftCount: i,
						count: o
					}) ? this.messageController.getHistoryMessages({
						conversationID: n,
						count: 20
					}).then((function() {
						return i = t._computeLeftCount({
							conversationID: n,
							nextReqMessageID: r
						}), new zd(t._computeResult({
							conversationID: n,
							nextReqMessageID: r,
							count: o,
							leftCount: i
						}))
					})) : (Ms.log(
							"GetMessageHandler.getMessageList. get messagelist from memory"
							), this.messageController.modifyMessageList(n), Jd(this
							._computeResult({
								conversationID: n,
								nextReqMessageID: r,
								count: o,
								leftCount: i
							})))
				}
			}, {
				key: "setCompleted",
				value: function(e) {
					Ms.log("GetMessageHandler.setCompleted. conversationID=".concat(e)), this
						.completedMap.set(e, !0)
				}
			}, {
				key: "deleteCompletedItem",
				value: function(e) {
					Ms.log("GetMessageHandler.deleteCompletedItem. conversationID=".concat(e)),
						this.completedMap.delete(e)
				}
			}, {
				key: "_initListener",
				value: function() {
					var e = this;
					this.tim.innerEmitter.on(Rd, (function() {
						e.setCompleted(_n.CONV_SYSTEM)
					})), this.tim.innerEmitter.on(Ad, (function(t) {
						var n = t.data;
						e.setCompleted("".concat(_n.CONV_GROUP).concat(n))
					}))
				}
			}, {
				key: "_getMessageListSize",
				value: function(e) {
					return this.messageController.getLocalMessageList(e).length
				}
			}, {
				key: "_needGetHistory",
				value: function(e) {
					var t = e.conversationID,
						n = e.leftCount,
						r = e.count,
						o = this.tim.conversationController.getLocalConversation(t),
						i = !!o && o.type === _n.CONV_SYSTEM,
						a = !!o && o.subType === _n.GRP_AVCHATROOM;
					return !i && !a && (n < r && !this.completedMap.has(t))
				}
			}, {
				key: "_computeResult",
				value: function(e) {
					var t = e.conversationID,
						n = e.nextReqMessageID,
						r = e.count,
						o = e.leftCount,
						i = this._computeMessageList({
							conversationID: t,
							nextReqMessageID: n,
							count: r
						}),
						a = this._computeIsCompleted({
							conversationID: t,
							leftCount: o,
							count: r
						}),
						s = this._computeNextReqMessageID({
							messageList: i,
							isCompleted: a,
							conversationID: t
						});
					return Ms.log("GetMessageHandler._computeResult. conversationID=".concat(t,
						" leftCount=").concat(o, " count=").concat(r,
						" nextReqMessageID=").concat(s, " nums=").concat(i.length,
						" isCompleted=").concat(a)), {
						messageList: i,
						nextReqMessageID: s,
						isCompleted: a
					}
				}
			}, {
				key: "_computeNextReqMessageID",
				value: function(e) {
					var t = e.messageList,
						n = e.isCompleted,
						r = e.conversationID;
					if (!n) return 0 === t.length ? "" : t[0].ID;
					var o = this.messageController.getLocalMessageList(r);
					return 0 === o.length ? "" : o[0].ID
				}
			}, {
				key: "_computeMessageList",
				value: function(e) {
					var t = e.conversationID,
						n = e.nextReqMessageID,
						r = e.count,
						o = this.messageController.getLocalMessageList(t),
						i = this._computeIndexEnd({
							nextReqMessageID: n,
							messageList: o
						}),
						a = this._computeIndexStart({
							indexEnd: i,
							count: r
						});
					return o.slice(a, i)
				}
			}, {
				key: "_computeIndexEnd",
				value: function(e) {
					var t = e.messageList,
						n = void 0 === t ? [] : t,
						r = e.nextReqMessageID;
					return r ? n.findIndex((function(e) {
						return e.ID === r
					})) : n.length
				}
			}, {
				key: "_computeIndexStart",
				value: function(e) {
					var t = e.indexEnd,
						n = e.count;
					return t > n ? t - n : 0
				}
			}, {
				key: "_computeLeftCount",
				value: function(e) {
					var t = e.conversationID,
						n = e.nextReqMessageID;
					return n ? this.messageController.getLocalMessageList(t).findIndex((
						function(e) {
							return e.ID === n
						})) : this._getMessageListSize(t)
				}
			}, {
				key: "_computeIsCompleted",
				value: function(e) {
					var t = e.conversationID;
					return !!(e.leftCount <= e.count && this.completedMap.has(t))
				}
			}, {
				key: "reset",
				value: function() {
					Ms.log("GetMessageHandler.reset"), this.completedMap.clear()
				}
			}]), e
		}(),
		Dy = function e(t) {
			In(this, e), this.value = t, this.next = null
		},
		ky = function() {
			function e(t) {
				In(this, e), this.MAX_LENGTH = t, this.pTail = null, this.pNodeToDel = null, this.map = new Map,
					Ms.log("SinglyLinkedList init MAX_LENGTH=".concat(this.MAX_LENGTH))
			}
			return En(e, [{
				key: "pushIn",
				value: function(e) {
					var t = new Dy(e);
					if (this.map.size < this.MAX_LENGTH) null === this.pTail ? (this.pTail = t,
							this.pNodeToDel = t) : (this.pTail.next = t, this.pTail = t), this
						.map.set(e, 1);
					else {
						var n = this.pNodeToDel;
						this.pNodeToDel = this.pNodeToDel.next, this.map.delete(n.value), n
							.next = null, n = null, this.pTail.next = t, this.pTail = t, this
							.map.set(e, 1)
					}
				}
			}, {
				key: "has",
				value: function(e) {
					return this.map.has(e)
				}
			}, {
				key: "tail",
				value: function() {
					return this.pTail
				}
			}, {
				key: "size",
				value: function() {
					return this.map.size
				}
			}, {
				key: "data",
				value: function() {
					return Array.from(this.map.keys())
				}
			}, {
				key: "reset",
				value: function() {
					for (var e; null !== this.pNodeToDel;) e = this.pNodeToDel, this
						.pNodeToDel = this.pNodeToDel.next, e.next = null, e = null;
					this.pTail = null, this.map.clear()
				}
			}]), e
		}(),
		Ay = function() {
			function e(t) {
				In(this, e), this.tim = t
			}
			return En(e, [{
				key: "upload",
				value: function(e) {
					if (!0 === e.getRelayFlag()) return Promise.resolve();
					switch (e.type) {
						case _n.MSG_IMAGE:
							return this._uploadImage(e);
						case _n.MSG_FILE:
							return this._uploadFile(e);
						case _n.MSG_AUDIO:
							return this._uploadAudio(e);
						case _n.MSG_VIDEO:
							return this._uploadVideo(e);
						default:
							return Promise.resolve()
					}
				}
			}, {
				key: "_uploadImage",
				value: function(e) {
					var t = this.tim,
						n = t.uploadController,
						r = t.messageController,
						o = e.getElements()[0],
						i = r.getMessageOptionByID(e.messageID);
					return n.uploadImage({
						file: i.payload.file,
						to: i.to,
						onProgress: function(e) {
							if (o.updatePercent(e), Os(i.onProgress)) try {
								i.onProgress(e)
							} catch (t) {
								return Xd(new Vp({
									code: Bp
										.MESSAGE_ONPROGRESS_FUNCTION_ERROR,
									message: "".concat(rf)
								}))
							}
						}
					}).then((function(t) {
						var n = t.location,
							r = t.fileType,
							i = t.fileSize,
							a = t.width,
							s = t.height,
							u = Hs(n);
						o.updateImageFormat(r);
						var c = tu({
								originUrl: u,
								originWidth: a,
								originHeight: s,
								min: 198
							}),
							l = tu({
								originUrl: u,
								originWidth: a,
								originHeight: s,
								min: 720
							});
						return o.updateImageInfoArray([{
							size: i,
							url: u,
							width: a,
							height: s
						}, Dn({}, l), Dn({}, c)]), e
					}))
				}
			}, {
				key: "_uploadFile",
				value: function(e) {
					var t = this.tim,
						n = t.uploadController,
						r = t.messageController,
						o = e.getElements()[0],
						i = r.getMessageOptionByID(e.messageID);
					return n.uploadFile({
						file: i.payload.file,
						to: i.to,
						onProgress: function(e) {
							if (o.updatePercent(e), Os(i.onProgress)) try {
								i.onProgress(e)
							} catch (t) {
								return Xd(new Vp({
									code: Bp
										.MESSAGE_ONPROGRESS_FUNCTION_ERROR,
									message: "".concat(rf)
								}))
							}
						}
					}).then((function(t) {
						var n = t.location,
							r = Hs(n);
						return o.updateFileUrl(r), e
					}))
				}
			}, {
				key: "_uploadAudio",
				value: function(e) {
					var t = this.tim,
						n = t.uploadController,
						r = t.messageController,
						o = e.getElements()[0],
						i = r.getMessageOptionByID(e.messageID);
					return n.uploadAudio({
						file: i.payload.file,
						to: i.to,
						onProgress: function(e) {
							if (o.updatePercent(e), Os(i.onProgress)) try {
								i.onProgress(e)
							} catch (t) {
								return Xd(new Vp({
									code: Bp
										.MESSAGE_ONPROGRESS_FUNCTION_ERROR,
									message: "".concat(rf)
								}))
							}
						}
					}).then((function(t) {
						var n = t.location,
							r = Hs(n);
						return o.updateAudioUrl(r), e
					}))
				}
			}, {
				key: "_uploadVideo",
				value: function(e) {
					var t = this.tim,
						n = t.uploadController,
						r = t.messageController,
						o = e.getElements()[0],
						i = r.getMessageOptionByID(e.messageID);
					return n.uploadVideo({
						file: i.payload.file,
						to: i.to,
						onProgress: function(e) {
							if (o.updatePercent(e), Os(i.onProgress)) try {
								i.onProgress(e)
							} catch (t) {
								return Xd(new Vp({
									code: Bp
										.MESSAGE_ONPROGRESS_FUNCTION_ERROR,
									message: "".concat(rf)
								}))
							}
						}
					}).then((function(t) {
						var n = Hs(t.location);
						return o.updateVideoUrl(n), e
					}))
				}
			}]), e
		}(),
		Oy = "MergerMessageHandler",
		Ry = function() {
			function e(t) {
				In(this, e), this.messageController = t
			}
			return En(e, [{
				key: "uploadMergerMessage",
				value: function(e, t) {
					var n = this;
					Ms.debug("".concat(Oy, ".uploadMergerMessage message:"), e, "messageBytes="
						.concat(t));
					var r = e.payload,
						o = r.messageList,
						i = r.title,
						a = r.abstractList,
						s = r.compatibleText,
						u = r.version,
						c = o.length,
						l = new hg(wg);
					return this.messageController.request({
						name: "mergerMessage",
						action: "create",
						param: {
							messageList: o,
							title: i,
							abstractList: a,
							compatibleText: s,
							messageNumber: c,
							version: u
						}
					}).then((function(e) {
						Ms.debug("".concat(Oy,
							".uploadMergerMessage ok. response:"), e.data);
						var r = e.data,
							o = r.pbDownloadKey,
							i = r.downloadKey,
							a = {
								pbDownloadKey: o,
								downloadKey: i,
								messageNumber: c
							};
						return l.setNetworkType(n.messageController
						.getNetworkType()).setText("".concat(c, "-").concat(t,
							"-").concat(i)).setEnd(), a
					})).catch((function(e) {
						throw Ms.warn("".concat(Oy,
								".uploadMergerMessage failed. error:"), e), n
							.messageController.probeNetwork().then((function(t) {
								var n = Un(t, 2),
									r = n[0],
									o = n[1];
								l.setError(e, r, o).setEnd()
							})), e
					}))
				}
			}, {
				key: "downloadMergerMessage",
				value: function(e) {
					var t = this;
					Ms.debug("".concat(Oy, ".downloadMergerMessage message:"), e);
					var n = e.payload.downloadKey,
						r = new hg(bg);
					return this.messageController.request({
						name: "mergerMessage",
						action: "query",
						param: {
							downloadKey: n
						}
					}).then((function(o) {
						Ms.debug("".concat(Oy,
								".downloadMergerMessage ok. response:"), o.data), e
							.clearElement(), e.setElement({
								type: e.type,
								content: o.data
							});
						var i = o.data.messageList.length;
						return r.setNetworkType(t.messageController
							.getNetworkType()).setText("".concat(i, "-").concat(n))
							.setEnd(), e
					})).catch((function(e) {
						throw Ms.warn("".concat(Oy,
								".downloadMergerMessage failed. error:"), e), t
							.messageController.probeNetwork().then((function(t) {
								var n = Un(t, 2),
									o = n[0],
									i = n[1];
								r.setError(e, o, i).setEnd()
							})), e
					}))
				}
			}, {
				key: "createMergerMessagePack",
				value: function(e, t, n) {
					return e.conversationType === _n.CONV_C2C ? this
						._createC2CMergerMessagePack(e, t, n) : this
						._createGroupMergerMessagePack(e, t, n)
				}
			}, {
				key: "_createC2CMergerMessagePack",
				value: function(e, t, n) {
					var r = null;
					t && (t.offlinePushInfo && (r = t.offlinePushInfo), !0 === t
						.onlineUserOnly && (r ? r.disablePush = !0 : r = {
							disablePush: !0
						}));
					var o = n.pbDownloadKey,
						i = n.downloadKey,
						a = n.messageNumber,
						s = e.payload,
						u = s.title,
						c = s.abstractList,
						l = s.compatibleText;
					return {
						name: "c2cMessage",
						action: "create",
						tjgID: this.messageController.generateTjgID(e),
						param: {
							toAccount: e.to,
							msgBody: [{
								msgType: e.type,
								msgContent: {
									pbDownloadKey: o,
									downloadKey: i,
									title: u,
									abstractList: c,
									compatibleText: l,
									messageNumber: a
								}
							}],
							msgSeq: e.sequence,
							msgRandom: e.random,
							msgLifeTime: this.messageController.isOnlineMessage(e, t) ? 0 :
								void 0,
							offlinePushInfo: r ? {
								pushFlag: !0 === r.disablePush ? 1 : 0,
								title: r.title || "",
								desc: r.description || "",
								ext: r.extension || "",
								apnsInfo: {
									badgeMode: !0 === r.ignoreIOSBadge ? 1 : 0
								},
								androidInfo: {
									OPPOChannelID: r.androidOPPOChannelID || ""
								}
							} : void 0
						}
					}
				}
			}, {
				key: "_createGroupMergerMessagePack",
				value: function(e, t, n) {
					var r = null;
					t && t.offlinePushInfo && (r = t.offlinePushInfo);
					var o = n.pbDownloadKey,
						i = n.downloadKey,
						a = n.messageNumber,
						s = e.payload,
						u = s.title,
						c = s.abstractList,
						l = s.compatibleText;
					return {
						name: "groupMessage",
						action: "create",
						tjgID: this.messageController.generateTjgID(e),
						param: {
							groupID: e.to,
							msgBody: [{
								msgType: e.type,
								msgContent: {
									pbDownloadKey: o,
									downloadKey: i,
									title: u,
									abstractList: c,
									compatibleText: l,
									messageNumber: a
								}
							}],
							random: e.random,
							priority: e.priority,
							clientSequence: e.clientSequence,
							groupAtInfo: void 0,
							onlineOnlyFlag: this.messageController.isOnlineMessage(e, t) ? 1 :
								0,
							offlinePushInfo: r ? {
								pushFlag: !0 === r.disablePush ? 1 : 0,
								title: r.title || "",
								desc: r.description || "",
								ext: r.extension || "",
								apnsInfo: {
									badgeMode: !0 === r.ignoreIOSBadge ? 1 : 0
								},
								androidInfo: {
									OPPOChannelID: r.androidOPPOChannelID || ""
								}
							} : void 0
						}
					}
				}
			}]), e
		}(),
		Ny = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e))._initializeMembers(), r._initializeListener(), r
					._initializeHandlers(), r.messageOptionMap = new Map, r
			}
			return En(n, [{
				key: "_initializeMembers",
				value: function() {
					this.messagesList = new Iy({
							tim: this.tim
						}), this.currentMessageKey = {}, this.singlyLinkedList = new ky(100),
						this._peerReadTimeMap = new Map
				}
			}, {
				key: "_initializeHandlers",
				value: function() {
					this.readReportHandler = new Cy(this.tim, this), this.getMessageHandler =
						new Ty({
							messageController: this,
							tim: this.tim
						}), this.uploadFileHandler = new Ay(this.tim), this
						.mergerMessageHandler = new Ry(this)
				}
			}, {
				key: "reset",
				value: function() {
					this.messagesList.reset(), this.currentMessageKey = {}, this
						.getMessageHandler.reset(), this.singlyLinkedList.reset(), this
						._peerReadTimeMap.clear(), this.messageOptionMap.clear()
				}
			}, {
				key: "_initializeListener",
				value: function() {
					var e = this.tim.innerEmitter;
					e.on(od, this._onReceiveC2CMessage, this), e.on(Kh, this
						._onSyncMessagesProcessing, this), e.on(Hh, this
						._onSyncMessagesFinished, this), e.on(id, this
						._onReceiveGroupMessage, this), e.on(ad, this._onReceiveGroupTips,
						this), e.on(ud, this._onReceiveSystemNotice, this), e.on(pd, this
						._onReceiveGroupMessageRevokedNotice, this), e.on(fd, this
						._onReceiveGroupMessageReadNotice, this), e.on(hd, this
						._onReceiveC2CMessageRevokedNotice, this), e.on(dd, this
						._onC2CMessageReadReceipt, this), e.on(gd, this
						._onC2CMessageReadNotice, this), e.on(Dd, this
						._clearConversationMessages, this)
				}
			}, {
				key: "_guardForAVChatRoom",
				value: function(e) {
					if (e.conversationType === _n.CONV_GROUP) {
						var t = this.tim.groupController,
							n = e.to;
						return t.hasLocalGroup(n) ? Promise.resolve() : t.getGroupProfile({
							groupID: n
						}).then((function(t) {
							var r = t.data.group.type;
							if (Ms.log(
									"MessageController._guardForAVChatRoom. groupID="
									.concat(n, " type=").concat(r)), r === _n
								.GRP_AVCHATROOM) {
								var o = "userId=".concat(e.from, " 未加入群 groupID=")
									.concat(n,
										"。发消息前先使用 joinGroup 接口申请加群，详细请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#joinGroup"
										);
								return Ms.warn(
									"MessageController._guardForAVChatRoom sendMessage not allowed. "
									.concat(o)), Xd(new Vp({
									code: Bp.MESSAGE_SEND_FAIL,
									message: o,
									data: {
										message: e
									}
								}))
							}
							return Promise.resolve()
						}))
					}
					return Promise.resolve()
				}
			}, {
				key: "sendMessageInstance",
				value: function(e, t) {
					var n, r = this,
						o = null;
					switch (e.conversationType) {
						case _n.CONV_C2C:
							o = this._handleOnSendC2CMessageSuccess.bind(this);
							break;
						case _n.CONV_GROUP:
							o = this._handleOnSendGroupMessageSuccess.bind(this);
							break;
						default:
							return Xd(new Vp({
								code: Bp.MESSAGE_SEND_INVALID_CONVERSATION_TYPE,
								message: tf
							}))
					}
					return this.singlyLinkedList.pushIn(e.random), this.uploadFileHandler
						.upload(e).then((function() {
							return r._guardForAVChatRoom(e).then((function() {
								var o = null;
								if (!e.isSendable()) return Xd({
									code: Bp
										.MESSAGE_FILE_URL_IS_EMPTY,
									message: vf
								});
								r._addSendMessageTotalCount(e), n = Date
									.now();
								var i = function(e) {
									var t = "utf-8";
									Va && document && (t = document
										.charset.toLowerCase());
									var n, r, o = 0;
									if (r = e.length, "utf-8" === t ||
										"utf8" === t)
										for (var i = 0; i < r; i++)(n =
												e.codePointAt(i)) <=
											127 ? o += 1 : n <= 2047 ?
											o += 2 : n <= 65535 ? o +=
											3 : (o += 4, i++);
									else if ("utf-16" === t ||
										"utf16" === t)
										for (var a = 0; a < r; a++)(n =
												e.codePointAt(a)) <=
											65535 ? o += 2 : (o += 4,
												a++);
									else o = e.replace(/[^\x00-\xff]/g,
										"aa").length;
									return o
								}(JSON.stringify(e));
								return e.type === _n.MSG_MERGER && i > 7e3 ?
									r.mergerMessageHandler
									.uploadMergerMessage(e, i).then((
										function(n) {
											return o = r
												.mergerMessageHandler
												.createMergerMessagePack(
													e, t, n), r.request(
													o)
										})) : (e.conversationType === _n
										.CONV_C2C ? o = r
										._createC2CMessagePack(e, t) : e
										.conversationType === _n
										.CONV_GROUP && (o = r
											._createGroupMessagePack(e, t)),
										r.request(o))
							})).then((function(i) {
								r._addSendMessageSuccessCount(e, n);
								var a = !1;
								if (e.conversationType === _n.CONV_GROUP) e
									.sequence = i.data.sequence, e.time = i
									.data.time, e.generateMessageID(r.tim
										.context.identifier);
								else if (e.conversationType === _n
									.CONV_C2C) {
									var s = r.messagesList
										.getLatestMessageSentByMe(e
											.conversationID);
									if (s) {
										var u = s.nick,
											c = s.avatar;
										u === e.nick && c === e.avatar || (
											a = !0)
									}
								}
								return r.messagesList.pushIn(e), o(e, i
										.data), a && r.messagesList
									.modifyMessageSentByMe({
										conversationID: e
											.conversationID,
										latestNick: e.nick,
										latestAvatar: e.avatar
									}), r.messageOptionMap.delete(e
										.messageID), r.isOnlineMessage(e,
									t) ? e.setOnlineOnlyFlag(!0) : r
									.emitInnerEvent($h, {
										eventDataList: [{
											conversationID: e
												.conversationID,
											unreadCount: 0,
											type: e
												.conversationType,
											subType: e
												.conversationSubType,
											lastMessage: e
										}]
									}), e.getRelayFlag() ||
									"TIMImageElem" !== e.type || nu(e
										.payload.imageInfoArray), new zd({
										message: e
									})
							})).catch((function(t) {
								e.status = Qu.FAIL;
								var n = new hg(Sg);
								return n.setMessageType(e.type).setText(""
										.concat(r.generateTjgID(e), "-")
										.concat(e.type, "-").concat(e.from,
											"-").concat(e.to)), r
									.probeNetwork().then((function(e) {
										var r = Un(e, 2),
											o = r[0],
											i = r[1];
										n.setError(t, o, i).setEnd()
									})), Ms.error(
										"MessageController.sendMessageInstance error:",
										t), Xd(new Vp({
										code: t && t.code ? t.code :
											Bp.MESSAGE_SEND_FAIL,
										message: t && t.message ? t
											.message : Qp,
										data: {
											message: e
										}
									}))
							}))
						}))
				}
			}, {
				key: "_getSendMessageSpecifiedKey",
				value: function(e) {
					if (e.conversationType === _n.CONV_C2C) return rg;
					if (e.conversationType === _n.CONV_GROUP) {
						var t = this.tim.groupController.getLocalGroupProfile(e.to);
						if (!t) return;
						var n = t.type;
						if (zs(n)) return og;
						if (Ws(n)) return ig;
						if (Ys(n)) return ag;
						if (Js(n)) return sg
					}
				}
			}, {
				key: "_addSendMessageTotalCount",
				value: function(e) {
					var t = this.tim.sumStatController;
					t.addTotalCount(ng);
					var n = this._getSendMessageSpecifiedKey(e);
					n && t.addTotalCount(n)
				}
			}, {
				key: "_addSendMessageSuccessCount",
				value: function(e, t) {
					var n = this.tim.sumStatController,
						r = Math.abs(Date.now() - t);
					n.addSuccessCount(ng), n.addCost(ng, r);
					var o = this._getSendMessageSpecifiedKey(e);
					o && (n.addSuccessCount(o), n.addCost(o, r))
				}
			}, {
				key: "resendMessage",
				value: function(e) {
					return e.isResend = !0, e.status = Qu.UNSEND, this.sendMessageInstance(e)
				}
			}, {
				key: "_isFileLikeMessage",
				value: function(e) {
					return [_n.MSG_IMAGE, _n.MSG_FILE, _n.MSG_AUDIO, _n.MSG_VIDEO].indexOf(e
						.type) >= 0
				}
			}, {
				key: "_resendBinaryTypeMessage",
				value: function() {}
			}, {
				key: "_canIUseOnlineOnlyFlag",
				value: function(e) {
					var t = this.tim.groupController.getJoinedAVChatRoom();
					return !t || !t.includes(e.to) || e.conversationType !== _n.CONV_GROUP
				}
			}, {
				key: "isOnlineMessage",
				value: function(e, t) {
					return !(!this._canIUseOnlineOnlyFlag(e) || !t || !0 !== t.onlineUserOnly)
				}
			}, {
				key: "_createC2CMessagePack",
				value: function(e, t) {
					var n = null;
					return t && (t.offlinePushInfo && (n = t.offlinePushInfo), !0 === t
						.onlineUserOnly && (n ? n.disablePush = !0 : n = {
							disablePush: !0
						})), {
						name: "c2cMessage",
						action: "create",
						tjgID: this.generateTjgID(e),
						param: {
							toAccount: e.to,
							msgBody: e.getElements(),
							msgSeq: e.sequence,
							msgRandom: e.random,
							msgLifeTime: this.isOnlineMessage(e, t) ? 0 : void 0,
							nick: e.nick,
							avatar: e.avatar,
							offlinePushInfo: n ? {
								pushFlag: !0 === n.disablePush ? 1 : 0,
								title: n.title || "",
								desc: n.description || "",
								ext: n.extension || "",
								apnsInfo: {
									badgeMode: !0 === n.ignoreIOSBadge ? 1 : 0
								},
								androidInfo: {
									OPPOChannelID: n.androidOPPOChannelID || ""
								}
							} : void 0
						}
					}
				}
			}, {
				key: "_handleOnSendC2CMessageSuccess",
				value: function(e, t) {
					e.status = Qu.SUCCESS, e.time = t.time
				}
			}, {
				key: "_createGroupMessagePack",
				value: function(e, t) {
					var n = null;
					t && t.offlinePushInfo && (n = t.offlinePushInfo);
					var r = e.getGroupAtInfoList();
					return {
						name: "groupMessage",
						action: "create",
						tjgID: this.generateTjgID(e),
						param: {
							groupID: e.to,
							msgBody: e.getElements(),
							random: e.random,
							priority: e.priority,
							clientSequence: e.clientSequence,
							groupAtInfo: e.type !== _n.MSG_TEXT || ou(r) ? void 0 : r,
							onlineOnlyFlag: this.isOnlineMessage(e, t) ? 1 : 0,
							offlinePushInfo: n ? {
								pushFlag: !0 === n.disablePush ? 1 : 0,
								title: n.title || "",
								desc: n.description || "",
								ext: n.extension || "",
								apnsInfo: {
									badgeMode: !0 === n.ignoreIOSBadge ? 1 : 0
								},
								androidInfo: {
									OPPOChannelID: n.androidOPPOChannelID || ""
								}
							} : void 0
						}
					}
				}
			}, {
				key: "_handleOnSendGroupMessageSuccess",
				value: function(e, t) {
					e.sequence = t.sequence, e.time = t.time, e.status = Qu.SUCCESS
				}
			}, {
				key: "_onReceiveC2CMessage",
				value: function(e) {
					Ms.debug("MessageController._onReceiveC2CMessage nums=".concat(e.data
						.length));
					var t = Date.now(),
						n = this._newC2CMessageStoredAndSummary({
							notifiesList: e.data,
							type: _n.CONV_C2C,
							C2CRemainingUnreadList: e.C2CRemainingUnreadList
						}),
						r = n.eventDataList,
						o = n.result;
					if (r.length > 0 && this.emitInnerEvent(Yh, {
							eventDataList: r,
							result: o
						}), o.length > 0) {
						var i = this.tim.sumStatController;
						i.addTotalCount(ug), i.addSuccessCount(ug), i.addCost(ug, Date.now() -
							t), this.emitOuterEvent(yn.MESSAGE_RECEIVED, o)
					}
				}
			}, {
				key: "_onReceiveGroupMessage",
				value: function(e) {
					Ms.debug("MessageController._onReceiveGroupMessage nums=".concat(e.data
						.length));
					var t = Date.now(),
						n = this.newGroupMessageStoredAndSummary(e.data),
						r = n.eventDataList,
						o = n.result;
					if (r.length > 0 && this.emitInnerEvent(Jh, {
							eventDataList: r,
							result: o,
							isGroupTip: !1
						}), o.length > 0) {
						var i = this.tim.sumStatController;
						i.addTotalCount(ug), i.addSuccessCount(ug), i.addCost(ug, Date.now() -
							t), this.emitOuterEvent(yn.MESSAGE_RECEIVED, o)
					}
				}
			}, {
				key: "_onReceiveGroupTips",
				value: function(e) {
					var t = Date.now(),
						n = e.data;
					Ms.debug("MessageController._onReceiveGroupTips nums=".concat(n.length));
					var r = this.newGroupTipsStoredAndSummary(n),
						o = r.eventDataList,
						i = r.result;
					if (o.length > 0 && this.emitInnerEvent(Jh, {
							eventDataList: o,
							result: i,
							isGroupTip: !0
						}), i.length > 0) {
						var a = this.tim.sumStatController;
						a.addTotalCount(ug), a.addSuccessCount(ug), a.addCost(ug, Date.now() -
							t), this.emitOuterEvent(yn.MESSAGE_RECEIVED, i)
					}
				}
			}, {
				key: "_onReceiveSystemNotice",
				value: function(e) {
					var t = Date.now(),
						n = e.data,
						r = n.groupSystemNotices,
						o = n.type;
					Ms.debug("MessageController._onReceiveSystemNotice nums=".concat(r.length));
					var i = this.newSystemNoticeStoredAndSummary({
							notifiesList: r,
							type: o
						}),
						a = i.eventDataList,
						s = i.result;
					if (a.length > 0 && this.emitInnerEvent(Xh, {
							eventDataList: a,
							result: s,
							type: o
						}), s.length > 0 && "poll" === o) {
						var u = this.tim.sumStatController;
						u.addTotalCount(ug), u.addSuccessCount(ug), u.addCost(ug, Date.now() -
							t), this.emitOuterEvent(yn.MESSAGE_RECEIVED, s)
					}
				}
			}, {
				key: "_onReceiveGroupMessageRevokedNotice",
				value: function(e) {
					var t = this;
					Ms.debug("MessageController._onReceiveGroupMessageRevokedNotice nums="
						.concat(e.data.length));
					var n = [],
						r = null;
					e.data.forEach((function(e) {
						var o = e.elements.revokedInfos;
						ks(o) || o.forEach((function(e) {
							(r = t.messagesList.revoke("GROUP".concat(e
								.groupID), e.sequence)) && n.push(r)
						}))
					})), 0 !== n.length && (this.emitInnerEvent(Qh, n), this.emitOuterEvent(
						yn.MESSAGE_REVOKED, n))
				}
			}, {
				key: "_onReceiveGroupMessageReadNotice",
				value: function(e) {
					var t = this;
					e.data.forEach((function(e) {
						var n = e.elements.groupMessageReadNotice;
						ks(n) || n.forEach((function(e) {
							var n = e.groupID,
								r = e.lastMessageSeq;
							Ms.debug(
								"MessageController._onReceiveGroupMessageReadNotice groupID="
								.concat(n, " lastMessageSeq=")
								.concat(r));
							var o = "".concat(_n.CONV_GROUP).concat(n);
							t.readReportHandler
								.updateIsReadAfterReadReport({
									conversationID: o,
									lastMessageSeq: r
								}), t.readReportHandler
								.updateUnreadCount(o)
						}))
					}))
				}
			}, {
				key: "_onReceiveC2CMessageRevokedNotice",
				value: function(e) {
					var t = this;
					Ms.debug("MessageController._onReceiveC2CMessageRevokedNotice nums=".concat(
						e.data.length));
					var n = [],
						r = null;
					e.data.forEach((function(e) {
						if (e.c2cMessageRevokedNotify) {
							var o = e.c2cMessageRevokedNotify.revokedInfos;
							ks(o) || o.forEach((function(e) {
								var o = t.tim.context.identifier === e
									.from ? "".concat(_n.CONV_C2C)
									.concat(e.to) : "".concat(_n
										.CONV_C2C).concat(e.from);
								(r = t.messagesList.revoke(o, e
									.sequence, e.random)) && n.push(r)
							}))
						}
					})), 0 !== n.length && (this.emitInnerEvent(Qh, n), this.emitOuterEvent(
						yn.MESSAGE_REVOKED, n))
				}
			}, {
				key: "_onC2CMessageReadReceipt",
				value: function(e) {
					var t = this;
					e.data.forEach((function(e) {
						if (!ou(e.c2cMessageReadReceipt)) {
							var n = e.c2cMessageReadReceipt.to;
							e.c2cMessageReadReceipt.uinPairReadArray.forEach((
								function(e) {
									var r = e.peerReadTime;
									Ms.debug(
										"MessageController._onC2CMessageReadReceipt to="
										.concat(n, " peerReadTime=")
										.concat(r));
									var o = "".concat(_n.CONV_C2C).concat(
									n);
									t.recordPeerReadTime(o, r), t
										._updateMessageIsPeerReadProperty(o,
											r)
								}))
						}
					}))
				}
			}, {
				key: "_onC2CMessageReadNotice",
				value: function(e) {
					var t = this;
					e.data.forEach((function(e) {
						ou(e.c2cMessageReadNotice) || e.c2cMessageReadNotice
							.uinPairReadArray.forEach((function(e) {
								var n = e.from,
									r = e.peerReadTime;
								Ms.debug(
									"MessageController._onC2CMessageReadNotice from="
									.concat(n, " lastReadTime=").concat(
										r));
								var o = "".concat(_n.CONV_C2C).concat(n);
								t.readReportHandler
									.updateIsReadAfterReadReport({
										conversationID: o,
										lastMessageTime: r
									}), t.readReportHandler
									.updateUnreadCount(o)
							}))
					}))
				}
			}, {
				key: "_updateMessageIsPeerReadProperty",
				value: function(e, t) {
					if (e.startsWith(_n.CONV_C2C) && t > 0) {
						var n = this.messagesList.updateMessageIsPeerReadProperty(e, t);
						n.length > 0 && this.emitOuterEvent(yn.MESSAGE_READ_BY_PEER, n)
					}
				}
			}, {
				key: "getPeerReadTime",
				value: function(e) {
					var t = this;
					if (!ou(e)) {
						var n = new hg(Lg);
						return Ms.log("MessageController.getPeerReadTime userIDList:".concat(
							e)), this.request({
								name: "c2cPeerReadTime",
								action: "get",
								param: {
									userIDList: e
								}
							}).then((function(r) {
								var o = r.data.peerReadTimeList;
								Ms.log("MessageController.getPeerReadTime ok. peerReadTimeList:"
									.concat(o));
								for (var i = "", a = 0; a < e.length; a++) i += ""
									.concat(e[a], "-").concat(o[a], " "), o[a] > 0 && t
									.recordPeerReadTime("C2C".concat(e[a]), o[a]);
								n.setNetworkType(t.getNetworkType()).setText(i).setEnd()
							})).catch((function(e) {
								t.probeNetwork().then((function(t) {
									var r = Un(t, 2),
										o = r[0],
										i = r[1];
									n.setError(e, o, i).setEnd()
								})), Ms.warn(
									"MessageController.getPeerReadTime failed. error:",
									e)
							}))
					}
				}
			}, {
				key: "recordPeerReadTime",
				value: function(e, t) {
					this._peerReadTimeMap.has(e) ? this._peerReadTimeMap.get(e) < t && this
						._peerReadTimeMap.set(e, t) : this._peerReadTimeMap.set(e, t)
				}
			}, {
				key: "_clearConversationMessages",
				value: function(e) {
					var t = e.data;
					this.messagesList.removeByConversationID(t), this.getMessageHandler
						.deleteCompletedItem(t)
				}
			}, {
				key: "_pushIntoNoticeResult",
				value: function(e, t) {
					return !(!this.messagesList.pushIn(t) || this.singlyLinkedList.has(t
						.random)) && (e.push(t), !0)
				}
			}, {
				key: "_getNickAndAvatarByUserID",
				value: function(e) {
					return this.tim.userController.getNickAndAvatarByUserID(e)
				}
			}, {
				key: "_newC2CMessageStoredAndSummary",
				value: function(e) {
					for (var t = e.notifiesList, n = e.type, r = e.C2CRemainingUnreadList, o = e
							.isFromSync, i = null, a = [], s = [], u = {}, c = this.tim
							.bigDataHallwayController, l = 0, p = t.length; l < p; l++) {
						var f = t[l];
						if (f.currentUser = this.tim.context.identifier, f.conversationType = n,
							f.isSystemMessage = !!f.isSystemMessage, i = new _h(f), f.elements =
							c.parseElements(f.elements, f.from), i.setElement(f.elements), i
							.setNickAndAvatar({
								nick: f.nick,
								avatar: f.avatar
							}), !o) {
							var h = i.conversationID,
								d = !1;
							if (i.from !== this.tim.context.identifier) {
								var g = this.messagesList.getLatestMessageSentByPeer(h);
								if (g) {
									var m = g.nick,
										v = g.avatar;
									m === i.nick && v === i.avatar || (d = !0)
								}
							} else {
								var y = this.messagesList.getLatestMessageSentByMe(h);
								if (y) {
									var _ = y.nick,
										M = y.avatar;
									_ === i.nick && M === i.avatar || this.messagesList
										.modifyMessageSentByMe({
											conversationID: h,
											latestNick: i.nick,
											latestAvatar: i.avatar
										})
								}
							}
							if (!this._pushIntoNoticeResult(s, i)) continue;
							d && (this.messagesList.modifyMessageSentByPeer(h), this.tim
								.conversationController.updateUserProfileSpecifiedKey({
									conversationID: h,
									nick: i.nick,
									avatar: i.avatar
								}))
						}
						0 !== f.msgLifeTime ? void 0 === u[i.conversationID] ? u[i
							.conversationID] = a.push({
							conversationID: i.conversationID,
							unreadCount: "out" === i.flow ? 0 : 1,
							type: i.conversationType,
							subType: i.conversationSubType,
							lastMessage: i
						}) - 1 : (a[u[i.conversationID]].type = i.conversationType, a[u[i
							.conversationID]].subType = i.conversationSubType, a[u[i
							.conversationID]].lastMessage = i, "in" === i.flow && a[u[i
							.conversationID]].unreadCount++) : i.setOnlineOnlyFlag(!0)
					}
					if (Ds(r))
						for (var I = function(e, t) {
								var n = a.find((function(t) {
									return t.conversationID === "C2C".concat(r[
										e].from)
								}));
								n ? n.unreadCount += r[e].count : a.push({
									conversationID: "C2C".concat(r[e].from),
									unreadCount: r[e].count,
									type: _n.CONV_C2C,
									lastMsgTime: r[e].lastMsgTime
								})
							}, C = 0, E = r.length; C < E; C++) I(C);
					return {
						eventDataList: a,
						result: s
					}
				}
			}, {
				key: "newGroupMessageStoredAndSummary",
				value: function(e) {
					var t = null,
						n = [],
						r = {},
						o = [],
						i = _n.CONV_GROUP,
						a = this.tim.bigDataHallwayController,
						s = e.length;
					s > 1 && e.sort((function(e, t) {
						return e.sequence - t.sequence
					}));
					for (var u = 0; u < s; u++) {
						var c = e[u];
						if (c.currentUser = this.tim.context.identifier, c.conversationType = i,
							c.isSystemMessage = !!c.isSystemMessage, t = new _h(c), c.elements =
							a.parseElements(c.elements, c.from), t.setElement(c.elements), !this
							._isMessageFromAVChatroom(t)) this._pushIntoNoticeResult(o, t) && (
							1 !== c.onlineOnlyFlag ? void 0 === r[t.conversationID] ? r[t
								.conversationID] = n.push({
								conversationID: t.conversationID,
								unreadCount: "out" === t.flow ? 0 : 1,
								type: t.conversationType,
								subType: t.conversationSubType,
								lastMessage: t
							}) - 1 : (n[r[t.conversationID]].type = t.conversationType, n[r[
									t.conversationID]].subType = t.conversationSubType, n[r[
									t.conversationID]].lastMessage = t, "in" === t.flow &&
								n[r[t.conversationID]].unreadCount++) : t.setOnlineOnlyFlag(
								!0))
					}
					return {
						eventDataList: n,
						result: o
					}
				}
			}, {
				key: "_isMessageFromAVChatroom",
				value: function(e) {
					var t = e.conversationID.slice(5);
					return this.tim.groupController.checkJoinedAVChatRoomByID(t)
				}
			}, {
				key: "newGroupTipsStoredAndSummary",
				value: function(e) {
					for (var t = null, n = [], r = [], o = {}, i = 0, a = e.length; i <
						a; i++) {
						var s = e[i];
						if (s.currentUser = this.tim.context.identifier, s.conversationType = _n
							.CONV_GROUP, (t = new _h(s)).setElement({
								type: _n.MSG_GRP_TIP,
								content: Dn(Dn({}, s.elements), {}, {
									groupProfile: s.groupProfile
								})
							}), t.isSystemMessage = !1, !this._isMessageFromAVChatroom(t)) this
							._pushIntoNoticeResult(r, t) && (void 0 === o[t.conversationID] ? o[
								t.conversationID] = n.push({
								conversationID: t.conversationID,
								unreadCount: "out" === t.flow ? 0 : 1,
								type: t.conversationType,
								subType: t.conversationSubType,
								lastMessage: t
							}) - 1 : (n[o[t.conversationID]].type = t.conversationType, n[o[
									t.conversationID]].subType = t.conversationSubType, n[o[
									t.conversationID]].lastMessage = t, "in" === t.flow &&
								n[o[t.conversationID]].unreadCount++))
					}
					return {
						eventDataList: n,
						result: r
					}
				}
			}, {
				key: "newSystemNoticeStoredAndSummary",
				value: function(e) {
					var t = e.notifiesList,
						n = e.type,
						r = null,
						o = t.length,
						i = 0,
						a = [],
						s = {
							conversationID: _n.CONV_SYSTEM,
							unreadCount: 0,
							type: _n.CONV_SYSTEM,
							subType: null,
							lastMessage: null
						};
					for (i = 0; i < o; i++) {
						var u = t[i];
						if (u.elements.operationType !== gp) u.currentUser = this.tim.context
							.identifier, u.conversationType = _n.CONV_SYSTEM, u.conversationID =
							_n.CONV_SYSTEM, (r = new _h(u)).setElement({
								type: _n.MSG_GRP_SYS_NOTICE,
								content: Dn(Dn({}, u.elements), {}, {
									groupProfile: u.groupProfile
								})
							}), r.isSystemMessage = !0, (1 === r.sequence && 1 === r.random ||
								2 === r.sequence && 2 === r.random) && (r.sequence = xs(), r
								.random = xs(), r.generateMessageID(u.currentUser), Ms.log(
									"MessageController.newSystemNoticeStoredAndSummary sequence and random maybe duplicated, regenerate. ID="
									.concat(r.ID))), this._pushIntoNoticeResult(a, r) && (
								"poll" === n ? s.unreadCount++ : "sync" === n && r.setIsRead(!
								0), s.subType = r.conversationSubType)
					}
					return s.lastMessage = a[a.length - 1], {
						eventDataList: a.length > 0 ? [s] : [],
						result: a
					}
				}
			}, {
				key: "_onSyncMessagesProcessing",
				value: function(e) {
					var t = this._newC2CMessageStoredAndSummary({
							notifiesList: e.data,
							type: _n.CONV_C2C,
							isFromSync: !0,
							C2CRemainingUnreadList: e.C2CRemainingUnreadList
						}),
						n = t.eventDataList,
						r = t.result;
					this.emitInnerEvent(zh, {
						eventDataList: n,
						result: r
					})
				}
			}, {
				key: "_onSyncMessagesFinished",
				value: function(e) {
					this.triggerReady();
					var t = this._newC2CMessageStoredAndSummary({
							notifiesList: e.data.messageList,
							type: _n.CONV_C2C,
							isFromSync: !0,
							C2CRemainingUnreadList: e.data.C2CRemainingUnreadList
						}),
						n = t.eventDataList,
						r = t.result;
					this.emitInnerEvent(Wh, {
						eventDataList: n,
						result: r
					})
				}
			}, {
				key: "getHistoryMessages",
				value: function(e) {
					if (e.conversationID === _n.CONV_SYSTEM) return Jd();
					!e.count && (e.count = 15), e.count > 20 && (e.count = 20);
					var t = this.messagesList.getLocalOldestMessageByConversationID(e
						.conversationID);
					t || ((t = {}).time = 0, t.sequence = 0, 0 === e.conversationID.indexOf(_n
							.CONV_C2C) ? (t.to = e.conversationID.replace(_n.CONV_C2C, ""),
							t.conversationType = _n.CONV_C2C) : 0 === e.conversationID
						.indexOf(_n.CONV_GROUP) && (t.to = e.conversationID.replace(_n
							.CONV_GROUP, ""), t.conversationType = _n.CONV_GROUP));
					var n = "";
					switch (t.conversationType) {
						case _n.CONV_C2C:
							return n = e.conversationID.replace(_n.CONV_C2C, ""), this
								.getC2CRoamMessages({
									conversationID: e.conversationID,
									peerAccount: n,
									count: e.count,
									lastMessageTime: void 0 === this.currentMessageKey[e
										.conversationID] ? 0 : t.time
								});
						case _n.CONV_GROUP:
							return this.getGroupRoamMessages({
								conversationID: e.conversationID,
								groupID: t.to,
								count: e.count,
								sequence: t.sequence - 1
							});
						default:
							return Jd()
					}
				}
			}, {
				key: "getC2CRoamMessages",
				value: function(e) {
					var t = this,
						n = e.conversationID,
						r = void 0 !== this.currentMessageKey[n] ? this.currentMessageKey[n] :
						"";
					Ms.log("MessageController.getC2CRoamMessages toAccount=".concat(e
						.peerAccount, " count=").concat(e.count || 15,
						" lastMessageTime=").concat(e.lastMessageTime || 0,
						" messageKey=").concat(r));
					var o = new hg(Dg);
					return this.request({
						name: "c2cMessage",
						action: "query",
						param: {
							peerAccount: e.peerAccount,
							count: e.count || 15,
							lastMessageTime: e.lastMessageTime || 0,
							messageKey: r
						}
					}).then((function(i) {
						var a = i.data,
							s = a.complete,
							u = a.messageList;
						ks(u) ? Ms.log(
								"MessageController.getC2CRoamMessages ok. complete="
								.concat(s, " but messageList is undefined!")) : Ms
							.log(
								"MessageController.getC2CRoamMessages ok. complete="
								.concat(s, " nums=").concat(u.length)), o
							.setNetworkType(t.getNetworkType()).setText("".concat(e
									.peerAccount, "-").concat(e.count || 15, "-")
								.concat(e.lastMessageTime || 0, "-").concat(r, "-")
								.concat(s, "-").concat(u ? u.length : "undefined"))
							.setEnd(), 1 === s && t.getMessageHandler.setCompleted(
								n);
						var c = t._roamMessageStore(u, _n.CONV_C2C, n);
						t.modifyMessageList(n), t.readReportHandler.updateIsRead(n),
							t.currentMessageKey[n] = i.data.messageKey;
						var l = t._peerReadTimeMap.get(n);
						if (Ms.log(
								"MessageController.getC2CRoamMessages update isPeerRead property. conversationID="
								.concat(n, " peerReadTime=").concat(l)), l) t
							._updateMessageIsPeerReadProperty(n, l);
						else {
							var p = n.replace(_n.CONV_C2C, "");
							t.getPeerReadTime([p]).then((function() {
								t._updateMessageIsPeerReadProperty(n, t
									._peerReadTimeMap.get(n))
							}))
						}
						return c
					})).catch((function(n) {
						return t.probeNetwork().then((function(t) {
							var i = Un(t, 2),
								a = i[0],
								s = i[1];
							o.setError(n, a, s).setText("".concat(e
									.peerAccount, "-").concat(e
									.count || 15, "-").concat(e
									.lastMessageTime || 0, "-")
								.concat(r)).setEnd()
						})), Ms.warn(
							"MessageController.getC2CRoamMessages failed. "
							.concat(n)), Xd(n)
					}))
				}
			}, {
				key: "modifyMessageList",
				value: function(e) {
					if (e.startsWith(_n.CONV_C2C)) {
						var t = Date.now();
						this.messagesList.modifyMessageSentByPeer(e);
						var n = this._getNickAndAvatarByUserID(this.tim.context.identifier);
						this.messagesList.modifyMessageSentByMe({
							conversationID: e,
							latestNick: n.nick,
							latestAvatar: n.avatar
						}), Ms.log("MessageController.modifyMessageList conversationID="
							.concat(e, " cost ").concat(Date.now() - t, " ms"))
					}
				}
			}, {
				key: "_computeLastSequence",
				value: function(e) {
					return e.sequence >= 0 ? Promise.resolve(e.sequence) : this.tim
						.groupController.getGroupLastSequence(e.groupID)
				}
			}, {
				key: "getGroupRoamMessages",
				value: function(e) {
					var t = this,
						n = new hg(kg),
						r = 0;
					return this._computeLastSequence(e).then((function(n) {
						return r = n, Ms.log(
								"MessageController.getGroupRoamMessages groupID="
								.concat(e.groupID, " lastSequence=").concat(r)), t
							.request({
								name: "groupMessage",
								action: "query",
								param: {
									groupID: e.groupID,
									count: 21,
									sequence: r
								}
							})
					})).then((function(o) {
						var i = o.data,
							a = i.messageList,
							s = i.complete;
						ks(a) ? Ms.log(
								"MessageController.getGroupRoamMessages ok. complete="
								.concat(s, " but messageList is undefined!")) : Ms
							.log(
								"MessageController.getGroupRoamMessages ok. complete="
								.concat(s, " nums=").concat(a.length)), n
							.setNetworkType(t.getNetworkType()).setText("".concat(e
									.groupID, "-").concat(r, "-").concat(s, "-")
								.concat(a ? a.length : "undefined")).setEnd();
						var u = "GROUP".concat(e.groupID);
						if (2 === s || ou(a)) return t.getMessageHandler
							.setCompleted(u), [];
						var c = t._roamMessageStore(a, _n.CONV_GROUP, u);
						return t.readReportHandler.updateIsRead(u), t
							._patchConversationLastMessage(u), c
					})).catch((function(o) {
						return t.probeNetwork().then((function(t) {
							var i = Un(t, 2),
								a = i[0],
								s = i[1];
							n.setError(o, a, s).setText("".concat(e
								.groupID, "-").concat(r)).setEnd()
						})), Ms.warn(
							"MessageController.getGroupRoamMessages failed. "
							.concat(o)), Xd(o)
					}))
				}
			}, {
				key: "_patchConversationLastMessage",
				value: function(e) {
					var t = this.tim.conversationController.getLocalConversation(e);
					if (t) {
						var n = t.lastMessage,
							r = n.messageForShow,
							o = n.payload;
						if (ou(r) || ou(o)) {
							var i = this.messagesList.getLocalMessageList(e);
							if (0 === i.length) return;
							var a = i[i.length - 1];
							Ms.log("MessageController._patchConversationLastMessage conversationID:"
								.concat(e, " payload:"), a.payload), t.updateLastMessage(a)
						}
					}
				}
			}, {
				key: "_roamMessageStore",
				value: function() {
					var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
						t = arguments.length > 1 ? arguments[1] : void 0,
						n = arguments.length > 2 ? arguments[2] : void 0,
						r = null,
						o = [],
						i = 0,
						a = e.length,
						s = null,
						u = t === _n.CONV_GROUP,
						c = this.tim.bigDataHallwayController,
						l = function() {
							i = u ? e.length - 1 : 0, a = u ? 0 : e.length
						},
						p = function() {
							u ? --i : ++i
						},
						f = function() {
							return u ? i >= a : i < a
						};
					for (l(); f(); p())
						if (u && 1 === e[i].sequence && this.getMessageHandler.setCompleted(n),
							1 !== e[i].isPlaceMessage)
							if ((r = new _h(e[i])).to = e[i].to, r.isSystemMessage = !!e[i]
								.isSystemMessage, r.conversationType = t, e[i].event === ip.JSON
								.TYPE.GROUP.TIP ? s = {
									type: _n.MSG_GRP_TIP,
									content: Dn(Dn({}, e[i].elements), {}, {
										groupProfile: e[i].groupProfile
									})
								} : (e[i].elements = c.parseElements(e[i].elements, e[i].from),
									s = e[i].elements), u || r.setNickAndAvatar({
									nick: e[i].nick,
									avatar: e[i].avatar
								}), ou(s)) {
								var h = new hg(Ng);
								h.setText("from:".concat(r.from, " to:").concat(r.to,
										" sequence:").concat(r.sequence, " event:").concat(
										e[i].event)), h.setNetworkType(this.getNetworkType())
									.setEnd()
							} else r.setElement(s), r.reInitialize(this.tim.context.identifier),
								o.push(r);
					return this.messagesList.unshift(o), l = p = f = null, o
				}
			}, {
				key: "getLocalMessageList",
				value: function(e) {
					return this.messagesList.getLocalMessageList(e)
				}
			}, {
				key: "getLocalMessage",
				value: function(e, t) {
					return this.messagesList.getLocalMessage(e, t)
				}
			}, {
				key: "hasLocalMessage",
				value: function(e, t) {
					return this.messagesList.hasLocalMessage(e, t)
				}
			}, {
				key: "deleteLocalMessage",
				value: function(e) {
					e instanceof _h && this.messagesList.remove(e)
				}
			}, {
				key: "revokeMessage",
				value: function(e) {
					var t, n = this;
					e.conversationType === _n.CONV_C2C ? t = {
						name: "c2cMessageWillBeRevoked",
						action: "create",
						param: {
							msgInfo: {
								fromAccount: e.from,
								toAccount: e.to,
								msgSeq: e.sequence,
								msgRandom: e.random,
								msgTimeStamp: e.time
							}
						}
					} : e.conversationType === _n.CONV_GROUP && (t = {
						name: "groupMessageWillBeRevoked",
						action: "create",
						param: {
							to: e.to,
							msgSeqList: [{
								msgSeq: e.sequence
							}]
						}
					});
					var r = new hg(Ag);
					return r.setMessageType(e.type).setText("".concat(this.generateTjgID(e),
							"-").concat(e.type, "-").concat(e.from, "-").concat(e.to)), this
						.request(t).then((function(t) {
							var o = t.data.recallRetList;
							if (!ou(o) && 0 !== o[0].retCode) {
								var i = new Vp({
									code: o[0].retCode,
									message: Fp[o[0].retCode] || of ,
									data: {
										message: e
									}
								});
								return r.setCode(i.code).setMessage(i.message).setEnd(),
									Xd(i)
							}
							return Ms.info("MessageController.revokeMessage ok. ID="
									.concat(e.ID)), e.isRevoked = !0, r.setEnd(), n
								.emitInnerEvent(Qh, [e]), new zd({
									message: e
								})
						})).catch((function(t) {
							n.probeNetwork().then((function(e) {
								var n = Un(e, 2),
									o = n[0],
									i = n[1];
								r.setError(t, o, i).setEnd()
							}));
							var o = new Vp({
								code: t && t.code ? t.code : Bp
									.MESSAGE_REVOKE_FAIL,
								message: t && t.message ? t.message : of ,
								data: {
									message: e
								}
							});
							return Ms.warn("MessageController.revokeMessage failed. ID="
								.concat(e.ID, " code=").concat(o.code, " message=")
								.concat(o.message)), Xd(o)
						}))
				}
			}, {
				key: "setMessageRead",
				value: function(e) {
					var t = this;
					return new Promise((function(n, r) {
						t.ready((function() {
							t.readReportHandler.setMessageRead(e).then(
								n).catch(r)
						}))
					}))
				}
			}, {
				key: "getMessageList",
				value: function(e) {
					return this.getMessageHandler.getMessageList(e)
				}
			}, {
				key: "createTextMessage",
				value: function(e) {
					var t = this.tim.context.identifier;
					e.currentUser = t;
					var n = new _h(e),
						r = "string" == typeof e.payload ? e.payload : e.payload.text,
						o = new ec({
							text: r
						}),
						i = this._getNickAndAvatarByUserID(t);
					return n.setElement(o), n.setNickAndAvatar(i), n
				}
			}, {
				key: "createCustomMessage",
				value: function(e) {
					var t = this.tim.context.identifier;
					e.currentUser = t;
					var n = new _h(e),
						r = new uh({
							data: e.payload.data,
							description: e.payload.description,
							extension: e.payload.extension
						}),
						o = this._getNickAndAvatarByUserID(t);
					return n.setElement(r), n.setNickAndAvatar(o), n
				}
			}, {
				key: "createImageMessage",
				value: function(e) {
					var t = this.tim.context.identifier;
					e.currentUser = t;
					var n = new _h(e);
					if (Fa) {
						var r = e.payload.file;
						if (Is(r)) return void Ms.warn(
							"小程序环境下调用 createImageMessage 接口时，payload.file 不支持传入 File 对象"
							);
						var o = r.tempFilePaths[0],
							i = {
								url: o,
								name: o.slice(o.lastIndexOf("/") + 1),
								size: r.tempFiles && r.tempFiles[0].size || 1,
								type: o.slice(o.lastIndexOf(".") + 1).toLowerCase()
							};
						e.payload.file = i
					} else if (Va && Is(e.payload.file)) {
						var a = e.payload.file;
						e.payload.file = {
							files: [a]
						}
					}
					var s = new Sp({
							imageFormat: ip.IMAGE_FORMAT.UNKNOWN,
							uuid: this._generateUUID(),
							file: e.payload.file
						}),
						u = this._getNickAndAvatarByUserID(t);
					return n.setElement(s), n.setNickAndAvatar(u), this.messageOptionMap.set(n
						.messageID, e), n
				}
			}, {
				key: "createFileMessage",
				value: function(e) {
					if (!Fa) {
						if (Va && Is(e.payload.file)) {
							var t = e.payload.file;
							e.payload.file = {
								files: [t]
							}
						}
						var n = this.tim.context.identifier;
						e.currentUser = n;
						var r = new _h(e),
							o = new sh({
								uuid: this._generateUUID(),
								file: e.payload.file
							}),
							i = this._getNickAndAvatarByUserID(n);
						return r.setElement(o), r.setNickAndAvatar(i), this.messageOptionMap
							.set(r.messageID, e), r
					}
					Ms.warn("小程序目前不支持选择文件， createFileMessage 接口不可用！")
				}
			}, {
				key: "createAudioMessage",
				value: function(e) {
					if (Fa) {
						var t = e.payload.file;
						if (Fa) {
							var n = {
								url: t.tempFilePath,
								name: t.tempFilePath.slice(t.tempFilePath.lastIndexOf("/") +
									1),
								size: t.fileSize,
								second: parseInt(t.duration) / 1e3,
								type: t.tempFilePath.slice(t.tempFilePath.lastIndexOf(".") +
									1).toLowerCase()
							};
							e.payload.file = n
						}
						var r = this.tim.context.identifier;
						e.currentUser = r;
						var o = new _h(e),
							i = new Dp({
								second: Math.floor(t.duration / 1e3),
								size: t.fileSize,
								url: t.tempFilePath,
								uuid: this._generateUUID()
							}),
							a = this._getNickAndAvatarByUserID(r);
						return o.setElement(i), o.setNickAndAvatar(a), this.messageOptionMap
							.set(o.messageID, e), o
					}
					Ms.warn("createAudioMessage 目前只支持小程序环境下发语音消息")
				}
			}, {
				key: "createVideoMessage",
				value: function(e) {
					var t = this.tim.context.identifier;
					e.currentUser = t, e.payload.file.thumbUrl =
						"https://webim-1252463788.cos.ap-shanghai.myqcloud.com/assets/images/transparent.png",
						e.payload.file.thumbSize = 1668;
					var n = {};
					if (Fa) {
						if (Is(e.payload.file)) return void Ms.warn(
							"小程序环境下调用 createVideoMessage 接口时，payload.file 不支持传入 File 对象"
							);
						var r = e.payload.file;
						n.url = r.tempFilePath, n.name = r.tempFilePath.slice(r.tempFilePath
								.lastIndexOf("/") + 1), n.size = r.size, n.second = r.duration,
							n.type = r.tempFilePath.slice(r.tempFilePath.lastIndexOf(".") + 1)
							.toLowerCase()
					} else if (Va) {
						if (Is(e.payload.file)) {
							var o = e.payload.file;
							e.payload.file.files = [o]
						}
						var i = e.payload.file;
						n.url = window.URL.createObjectURL(i.files[0]), n.name = i.files[0]
							.name, n.size = i.files[0].size, n.second = i.files[0].duration ||
							0, n.type = i.files[0].type.split("/")[1]
					}
					e.payload.file.videoFile = n;
					var a = new _h(e),
						s = new ch({
							videoFormat: n.type,
							videoSecond: Number(n.second.toFixed(0)),
							videoSize: n.size,
							remoteVideoUrl: "",
							videoUrl: n.url,
							videoUUID: this._generateUUID(),
							thumbUUID: this._generateUUID(),
							thumbWidth: e.payload.file.width || 200,
							thumbHeight: e.payload.file.height || 200,
							thumbUrl: e.payload.file.thumbUrl,
							thumbSize: e.payload.file.thumbSize,
							thumbFormat: e.payload.file.thumbUrl.slice(e.payload.file
								.thumbUrl.lastIndexOf(".") + 1).toLowerCase()
						}),
						u = this._getNickAndAvatarByUserID(t);
					return a.setElement(s), a.setNickAndAvatar(u), this.messageOptionMap.set(a
						.messageID, e), a
				}
			}, {
				key: "createFaceMessage",
				value: function(e) {
					var t = this.tim.context.identifier;
					e.currentUser = t;
					var n = new _h(e),
						r = new Tp(e.payload),
						o = this._getNickAndAvatarByUserID(t);
					return n.setElement(r), n.setNickAndAvatar(o), n
				}
			}, {
				key: "createMergerMessage",
				value: function(e) {
					var t = this.tim.context.identifier;
					e.currentUser = t;
					var n = this._getNickAndAvatarByUserID(t),
						r = new _h(e),
						o = new vh(e.payload);
					return r.setElement(o), r.setNickAndAvatar(n), r.setRelayFlag(!0), r
				}
			}, {
				key: "createForwardMessage",
				value: function(e) {
					var t = e.to,
						n = e.conversationType,
						r = e.priority,
						o = e.payload,
						i = this.tim.context.identifier,
						a = this._getNickAndAvatarByUserID(i);
					if (o.type === _n.MSG_GRP_TIP) return Xd(new Vp({
						code: Bp.MESSAGE_FORWARD_TYPE_INVALID,
						message: If
					}));
					var s = {
							to: t,
							conversationType: n,
							conversationID: "".concat(n).concat(t),
							priority: r,
							isPlaceMessage: 0,
							status: Qu.UNSEND,
							currentUser: i
						},
						u = new _h(s);
					return u.setElement(o.getElements()[0]), u.setNickAndAvatar(a), u
						.setRelayFlag(!0), u
				}
			}, {
				key: "downloadMergerMessage",
				value: function(e) {
					return this.mergerMessageHandler.downloadMergerMessage(e)
				}
			}, {
				key: "_generateUUID",
				value: function() {
					var e = this.tim.context;
					return "".concat(e.SDKAppID, "-").concat(e.identifier, "-").concat(
					function() {
						for (var e = "", t = 32; t > 0; --t) e += Fs[Math.floor(Math
							.random() * Vs)];
						return e
					}())
				}
			}, {
				key: "generateTjgID",
				value: function(e) {
					return this.tim.context.tinyID + "-" + e.random
				}
			}, {
				key: "getMessageOptionByID",
				value: function(e) {
					return this.messageOptionMap.get(e)
				}
			}, {
				key: "isMessageSentByCurrentInstance",
				value: function(e) {
					return !(!this.messagesList.hasLocalMessage(e.conversationID, e.ID) && !this
						.singlyLinkedList.has(e.random))
				}
			}, {
				key: "pushToMessageList",
				value: function(e) {
					this.messagesList.pushIn(e)
				}
			}]), n
		}(Kd),
		Ly = function() {
			function e(t) {
				In(this, e), this.userID = "", this.avatar = "", this.nick = "", this.role = "", this.joinTime =
					"", this.lastSendMsgTime = "", this.nameCard = "", this.muteUntil = 0, this
					.memberCustomField = [], this._initMember(t)
			}
			return En(e, [{
				key: "_initMember",
				value: function(e) {
					this.updateMember(e)
				}
			}, {
				key: "updateMember",
				value: function(e) {
					var t = [null, void 0, "", 0, NaN];
					e.memberCustomField && $s(this.memberCustomField, e.memberCustomField), Ps(
						this, e, ["memberCustomField"], t)
				}
			}, {
				key: "updateRole",
				value: function(e) {
					["Owner", "Admin", "Member"].indexOf(e) < 0 || (this.role = e)
				}
			}, {
				key: "updateMuteUntil",
				value: function(e) {
					ks(e) || (this.muteUntil = Math.floor((Date.now() + 1e3 * e) / 1e3))
				}
			}, {
				key: "updateNameCard",
				value: function(e) {
					ks(e) || (this.nameCard = e)
				}
			}, {
				key: "updateMemberCustomField",
				value: function(e) {
					e && $s(this.memberCustomField, e)
				}
			}]), e
		}(),
		wy = function() {
			function e(t) {
				In(this, e), this.tim = t.tim, this.groupController = t.groupController, this._initListeners()
			}
			return En(e, [{
				key: "_initListeners",
				value: function() {
					this.tim.innerEmitter.on(Jh, this._onReceivedGroupTips, this)
				}
			}, {
				key: "_onReceivedGroupTips",
				value: function(e) {
					var t = this,
						n = e.data,
						r = n.result;
					n.isGroupTip && r.forEach((function(e) {
						switch (e.payload.operationType) {
							case 1:
								t._onNewMemberComeIn(e);
								break;
							case 2:
								t._onMemberQuit(e);
								break;
							case 3:
								t._onMemberKickedOut(e);
								break;
							case 4:
								t._onMemberSetAdmin(e);
								break;
							case 5:
								t._onMemberCancelledAdmin(e);
								break;
							case 6:
								t._onGroupProfileModified(e);
								break;
							case 7:
								t._onMemberInfoModified(e);
								break;
							default:
								Ms.warn("GroupTipsHandler._onReceivedGroupTips Unhandled groupTips. operationType=",
									e.payload.operationType)
						}
					}))
				}
			}, {
				key: "_onNewMemberComeIn",
				value: function(e) {
					var t = e.payload,
						n = t.memberNum,
						r = t.groupProfile.groupID,
						o = this.groupController.getLocalGroupProfile(r);
					o && Cs(n) && (o.memberNum = n)
				}
			}, {
				key: "_onMemberQuit",
				value: function(e) {
					var t = e.payload,
						n = t.memberNum,
						r = t.groupProfile.groupID,
						o = this.groupController.getLocalGroupProfile(r);
					o && Cs(n) && (o.memberNum = n), this.groupController
						.deleteLocalGroupMembers(r, e.payload.userIDList)
				}
			}, {
				key: "_onMemberKickedOut",
				value: function(e) {
					var t = e.payload,
						n = t.memberNum,
						r = t.groupProfile.groupID,
						o = this.groupController.getLocalGroupProfile(r);
					o && Cs(n) && (o.memberNum = n), this.groupController
						.deleteLocalGroupMembers(r, e.payload.userIDList)
				}
			}, {
				key: "_onMemberSetAdmin",
				value: function(e) {
					var t = this,
						n = e.payload.groupProfile.groupID;
					e.payload.userIDList.forEach((function(e) {
						var r = t.groupController.getLocalGroupMemberInfo(n, e);
						r && r.updateRole(_n.GRP_MBR_ROLE_ADMIN)
					}))
				}
			}, {
				key: "_onMemberCancelledAdmin",
				value: function(e) {
					var t = this,
						n = e.payload.groupProfile.groupID;
					e.payload.userIDList.forEach((function(e) {
						var r = t.groupController.getLocalGroupMemberInfo(n, e);
						r && r.updateRole(_n.GRP_MBR_ROLE_MEMBER)
					}))
				}
			}, {
				key: "_onGroupProfileModified",
				value: function(e) {
					var t = this,
						n = e.payload.newGroupProfile,
						r = e.payload.groupProfile.groupID,
						o = this.groupController.getLocalGroupProfile(r);
					Object.keys(n).forEach((function(e) {
						switch (e) {
							case "ownerID":
								t._ownerChaged(o, n);
								break;
							default:
								o[e] = n[e]
						}
					})), this.groupController.emitGroupListUpdate(!0, !0)
				}
			}, {
				key: "_ownerChaged",
				value: function(e, t) {
					var n = e.groupID,
						r = this.groupController.getLocalGroupProfile(n),
						o = this.tim.context.identifier;
					if (o === t.ownerID) {
						r.updateGroup({
							selfInfo: {
								role: _n.GRP_MBR_ROLE_OWNER
							}
						});
						var i = this.groupController.getLocalGroupMemberInfo(n, o),
							a = this.groupController.getLocalGroupProfile(n).ownerID,
							s = this.groupController.getLocalGroupMemberInfo(n, a);
						i && i.updateRole(_n.GRP_MBR_ROLE_OWNER), s && s.updateRole(_n
							.GRP_MBR_ROLE_MEMBER)
					}
				}
			}, {
				key: "_onMemberInfoModified",
				value: function(e) {
					var t = this,
						n = e.payload.groupProfile.groupID;
					e.payload.memberList.forEach((function(e) {
						var r = t.groupController.getLocalGroupMemberInfo(n, e
							.userID);
						r && e.muteTime && r.updateMuteUntil(e.muteTime)
					}))
				}
			}]), e
		}(),
		by = function() {
			function e(t) {
				In(this, e), this.groupController = t.groupController, this.tim = t.tim, this.pendencyMap =
					new Map, this._initLiceners()
			}
			return En(e, [{
				key: "_initLiceners",
				value: function() {
					this.tim.innerEmitter.on(Xh, this._onReceivedGroupSystemNotice, this), this
						.tim.innerEmitter.on(Hh, this._clearGroupSystemNotice, this)
				}
			}, {
				key: "_clearGroupSystemNotice",
				value: function() {
					var e = this;
					this.getPendencyList().then((function(t) {
						t.forEach((function(t) {
							e.pendencyMap.set("".concat(t.from, "_")
								.concat(t.groupID, "_").concat(t
								.to), t)
						}));
						var n = e.tim.messageController.getLocalMessageList(_n
								.CONV_SYSTEM),
							r = [];
						n.forEach((function(t) {
							var n = t.payload,
								o = n.operatorID,
								i = n.operationType,
								a = n.groupProfile;
							if (i === ap) {
								var s = "".concat(o, "_").concat(a
										.groupID, "_").concat(a.to),
									u = e.pendencyMap.get(s);
								u && Cs(u.handled) && 0 !== u.handled &&
									r.push(t)
							}
						})), e.groupController.deleteGroupSystemNotice({
							messageList: r
						})
					}))
				}
			}, {
				key: "getPendencyList",
				value: function(e) {
					var t = this;
					return this.groupController.request({
						name: "group",
						action: "getGroupPendency",
						param: {
							startTime: e && e.startTime ? e.startTime : 0,
							limit: e && e.limit ? e.limit : 10,
							handleAccount: this.tim.context.identifier
						}
					}).then((function(e) {
						var n = e.data,
							r = n.pendencyList;
						return 0 !== n.nextStartTime ? t.getPendencyList({
							startTime: n.nextStartTime
						}).then((function(e) {
							return [].concat(qn(r), qn(e))
						})) : r
					}))
				}
			}, {
				key: "_onReceivedGroupSystemNotice",
				value: function(e) {
					var t = this,
						n = e.data,
						r = n.result;
					"sync" !== n.type && r.forEach((function(e) {
						switch (e.payload.operationType) {
							case 1:
								t._onApplyGroupRequest(e);
								break;
							case 2:
								t._onApplyGroupRequestAgreed(e);
								break;
							case 3:
								t._onApplyGroupRequestRefused(e);
								break;
							case 4:
								t._onMemberKicked(e);
								break;
							case 5:
								t._onGroupDismissed(e);
								break;
							case 6:
								break;
							case 7:
								t._onInviteGroup(e);
								break;
							case 8:
								t._onQuitGroup(e);
								break;
							case 9:
								t._onSetManager(e);
								break;
							case 10:
								t._onDeleteManager(e);
								break;
							case 11:
							case 12:
							case 15:
								break;
							case 255:
								t.groupController.emitOuterEvent(yn
									.GROUP_SYSTEM_NOTICE_RECEIVED, {
										message: e,
										type: mp
									})
						}
					}))
				}
			}, {
				key: "_onApplyGroupRequest",
				value: function(e) {
					this.groupController.emitOuterEvent(yn.GROUP_SYSTEM_NOTICE_RECEIVED, {
						message: e,
						type: ap
					})
				}
			}, {
				key: "_onApplyGroupRequestAgreed",
				value: function(e) {
					var t = this,
						n = e.payload.groupProfile.groupID;
					this.groupController.hasLocalGroup(n) || this.groupController
						.getGroupProfile({
							groupID: n
						}).then((function(e) {
							var n = e.data.group;
							n && (t.groupController.updateGroupMap([n]), t
								.groupController.emitGroupListUpdate())
						})), this.groupController.emitOuterEvent(yn
							.GROUP_SYSTEM_NOTICE_RECEIVED, {
								message: e,
								type: sp
							})
				}
			}, {
				key: "_onApplyGroupRequestRefused",
				value: function(e) {
					this.groupController.emitOuterEvent(yn.GROUP_SYSTEM_NOTICE_RECEIVED, {
						message: e,
						type: up
					})
				}
			}, {
				key: "_onMemberKicked",
				value: function(e) {
					var t = e.payload.groupProfile.groupID;
					this.groupController.hasLocalGroup(t) && this.groupController
						.deleteLocalGroupAndConversation(t), this.groupController
						.emitOuterEvent(yn.GROUP_SYSTEM_NOTICE_RECEIVED, {
							message: e,
							type: cp
						})
				}
			}, {
				key: "_onGroupDismissed",
				value: function(e) {
					var t = e.payload.groupProfile.groupID,
						n = this.groupController.hasLocalGroup(t),
						r = this.groupController.AVChatRoomHandler;
					n && this.groupController.deleteLocalGroupAndConversation(t), r
						.checkJoinedAVChatRoomByID(t) && r.reset(t), this.groupController
						.emitOuterEvent(yn.GROUP_SYSTEM_NOTICE_RECEIVED, {
							message: e,
							type: lp
						})
				}
			}, {
				key: "_onInviteGroup",
				value: function(e) {
					var t = this,
						n = e.payload.groupProfile.groupID;
					this.groupController.hasLocalGroup(n) || this.groupController
						.getGroupProfile({
							groupID: n
						}).then((function(e) {
							var n = e.data.group;
							n && (t.groupController.updateGroupMap([n]), t
								.groupController.emitGroupListUpdate())
						})), this.groupController.emitOuterEvent(yn
							.GROUP_SYSTEM_NOTICE_RECEIVED, {
								message: e,
								type: pp
							})
				}
			}, {
				key: "_onQuitGroup",
				value: function(e) {
					var t = e.payload.groupProfile.groupID;
					this.groupController.hasLocalGroup(t) && this.groupController
						.deleteLocalGroupAndConversation(t), this.groupController
						.emitOuterEvent(yn.GROUP_SYSTEM_NOTICE_RECEIVED, {
							message: e,
							type: fp
						})
				}
			}, {
				key: "_onSetManager",
				value: function(e) {
					var t = e.payload.groupProfile,
						n = t.to,
						r = t.groupID,
						o = this.groupController.getLocalGroupMemberInfo(r, n);
					o && o.updateRole(_n.GRP_MBR_ROLE_ADMIN), this.groupController
						.emitOuterEvent(yn.GROUP_SYSTEM_NOTICE_RECEIVED, {
							message: e,
							type: hp
						})
				}
			}, {
				key: "_onDeleteManager",
				value: function(e) {
					var t = e.payload.groupProfile,
						n = t.to,
						r = t.groupID,
						o = this.groupController.getLocalGroupMemberInfo(r, n);
					o && o.updateRole(_n.GRP_MBR_ROLE_MEMBER), this.groupController
						.emitOuterEvent(yn.GROUP_SYSTEM_NOTICE_RECEIVED, {
							message: e,
							type: dp
						})
				}
			}, {
				key: "reset",
				value: function() {
					this.pendencyMap.clear()
				}
			}]), e
		}(),
		Py = hn("splice"),
		Gy = Math.max,
		Uy = Math.min;
	Re({
		target: "Array",
		proto: !0,
		forced: !Py
	}, {
		splice: function(e, t) {
			var n, r, o, i, a, s, u = je(this),
				c = ue(u.length),
				l = pe(e, c),
				p = arguments.length;
			if (0 === p ? n = r = 0 : 1 === p ? (n = 0, r = c - l) : (n = p - 2, r = Uy(Gy(ae(t),
					0), c - l)), c + n - r > 9007199254740991) throw TypeError(
				"Maximum allowed length exceeded");
			for (o = it(u, r), i = 0; i < r; i++)(a = l + i) in u && Et(o, i, u[a]);
			if (o.length = r, n < r) {
				for (i = l; i < c - r; i++) s = i + n, (a = i + r) in u ? u[s] = u[a] : delete u[s];
				for (i = c; i > c - r + n; i--) delete u[i - 1]
			} else if (n > r)
				for (i = c - r; i > l; i--) s = i + n - 1, (a = i + r - 1) in u ? u[s] = u[a] :
					delete u[s];
			for (i = 0; i < n; i++) u[i + l] = arguments[i + 2];
			return u.length = c - r + n, o
		}
	});
	var qy = {
			3: !0,
			4: !0,
			5: !0,
			6: !0
		},
		xy = function() {
			function e(t) {
				var n = t.tim,
					r = t.groupController;
				In(this, e), this.tim = n, this.groupController = r, this.sequencesLinkedList = new ky(100),
					this.receivedMessageCount = 0, this._pollingRequestInfoMap = new Map, this
					._pollingInstanceMap = new Map, this._joinedGroupMap = new Map, this
					._reportMessageStackedCount = 0, this._onlineMemberCountMap = new Map, this
					.DEFAULT_EXPIRE_TIME = 60
			}
			return En(e, [{
				key: "hasJoinedAVChatRoom",
				value: function() {
					return this._joinedGroupMap.size > 0
				}
			}, {
				key: "checkJoinedAVChatRoomByID",
				value: function(e) {
					return this._joinedGroupMap.has(e)
				}
			}, {
				key: "getJoinedAVChatRoom",
				value: function() {
					return this._joinedGroupMap.size > 0 ? qn(this._joinedGroupMap.keys()) :
						null
				}
			}, {
				key: "start",
				value: function(e) {
					var t = this._pollingRequestInfoMap.get(e),
						n = {
							key: t.key,
							startSeq: t.startSeq
						};
					if (this._pollingInstanceMap.has(e)) {
						var r = this._pollingInstanceMap.get(e);
						r.isRunning() || r.start()
					} else {
						var o = this.groupController.createTransportCapsule({
								name: "AVChatRoom",
								action: "startLongPoll",
								param: n
							}),
							i = this.tim.connectionController.createRunLoop({
								pack: o,
								before: this._updateRequestData.bind(this, e),
								success: this._handleSuccess.bind(this, e),
								fail: this._handleFailure.bind(this),
								isAVChatRoomLoop: !0
							});
						i.start(), this._pollingInstanceMap.set(e, i), Ms.log(
							"AVChatRoomHandler.start message channel started. groupID="
							.concat(e))
					}
				}
			}, {
				key: "stop",
				value: function(e) {
					var t = this._pollingInstanceMap.get(e);
					t && t.isRunning() && (t.abort(), t.stop(), Ms.log(
						"AVChatRoomHandler.stop message channel stopped. groupID="
						.concat(e)))
				}
			}, {
				key: "startRunLoop",
				value: function(e) {
					var t = this;
					return this._precheck().then((function() {
						var n = e.longPollingKey,
							r = e.group,
							o = r.groupID;
						return t._pollingRequestInfoMap.set(o, {
								key: n,
								startSeq: 0
							}), t._joinedGroupMap.set(o, r), t._addAVChatRoomID(o),
							t.groupController.updateGroupMap([r]), t.groupController
							.emitGroupListUpdate(!0, !1), t.start(o), t
							.groupController.isLoggedIn() ? Jd({
								status: Yu.SUCCESS,
								group: r
							}) : Jd({
								status: Yu.SUCCESS
							})
					}))
				}
			}, {
				key: "joinWithoutAuth",
				value: function(e) {
					var t = this;
					return this.groupController.request({
						name: "group",
						action: "applyJoinAVChatRoom",
						param: e
					}).then((function(n) {
						var r = n.data.longPollingKey;
						if (ks(r)) return Xd(new Vp({
							code: Bp
								.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN,
							message: wf
						}));
						Ms.log("AVChatRoomHandler.joinWithoutAuth ok. groupID:"
								.concat(e.groupID)), t.groupController
							.emitInnerEvent(Od), t.groupController.emitInnerEvent(
								Ad, e.groupID);
						var o = new iy({
							groupID: e.groupID
						});
						return t.startRunLoop({
							group: o,
							longPollingKey: r
						}), new zd({
							status: Yu.SUCCESS
						})
					})).catch((function(t) {
						return Ms.error("AVChatRoomHandler.joinWithoutAuth error:"
							.concat(Gs(t), ". groupID:").concat(e.groupID)), Xd(
							t)
					}))
				}
			}, {
				key: "_precheck",
				value: function() {
					if (this.tim.context.unlimitedAVChatRoom) return Promise.resolve();
					if (!this.hasJoinedAVChatRoom()) return Promise.resolve();
					var e = Un(this._joinedGroupMap.entries().next().value, 2),
						t = e[0],
						n = e[1];
					if (this.groupController.isLoggedIn()) {
						if (!(n.selfInfo.role === _n.GRP_MBR_ROLE_OWNER || n.ownerID === this
								.tim.loginInfo.identifier)) return this.groupController
							.quitGroup(t);
						this.groupController.deleteLocalGroupAndConversation(t)
					} else this.groupController.deleteLocalGroupAndConversation(t);
					return this.reset(t), Promise.resolve()
				}
			}, {
				key: "_updateRequestData",
				value: function(e, t) {
					var n = this._pollingRequestInfoMap.get(e),
						r = n.key,
						o = n.startSeq;
					t.StartSeq = o, t.Key = r, this.tim.sumStatController.addTotalCount(tg)
				}
			}, {
				key: "_handleSuccess",
				value: function(e, t) {
					this.tim.sumStatController.addSuccessCount(tg), this.tim.sumStatController
						.addCost(tg, t.data.timecost);
					var n = t.data,
						r = n.errorCode,
						o = n.errorInfo,
						i = n.key,
						a = n.nextSeq,
						s = n.rspMsgList;
					if (r !== Ju.SUCCESS) {
						var u = this._pollingRequestInfoMap.get(e),
							c = new hg(lm),
							l = u ? "".concat(u.key, "-").concat(u.startSeq) :
							"requestInfo is undefined";
						c.setMessage("".concat(e, "-").concat(l, "-").concat(o || JSON
							.stringify(t.data))).setCode(r).setNetworkType(this
							.groupController.getNetworkType()).setEnd(!0)
					} else Es(i) && Cs(a) && this._pollingRequestInfoMap.set(e, {
						key: i,
						startSeq: a
					}), Ds(s) && s.length > 0 && (s.forEach((function(e) {
						e.to = e.groupID
					})), this._dispatchNotice(s));
					this.groupController.emitInnerEvent(vd)
				}
			}, {
				key: "_handleFailure",
				value: function(e) {
					if (e.error)
						if ("ECONNABORTED" === e.error.code || e.error.code === Bp
							.NETWORK_TIMEOUT)
							if (e.error.config) {
								var t = e.error.config.url,
									n = e.error.config.data;
								Ms.log("AVChatRoomHandler._handleFailure request timed out. url="
									.concat(t, " data=").concat(n))
							} else Ms.log("AVChatRoomHandler._handleFailure request timed out");
					else Ms.log(
						"AVChatRoomHandler._handleFailure request failed due to network error"
						);
					this.groupController.emitInnerEvent(md)
				}
			}, {
				key: "_dispatchNotice",
				value: function(e) {
					if (Ds(e) && 0 !== e.length) {
						var t = Date.now(),
							n = null,
							r = [],
							o = [],
							i = e.length;
						i > 1 && e.sort((function(e, t) {
							return e.sequence - t.sequence
						}));
						for (var a = 0; a < i; a++)
							if (qy[e[a].event]) {
								if (this.receivedMessageCount += 1, n = this.packMessage(e[a],
										e[a].event), this.tim.context.unlimitedAVChatRoom || !
									this.sequencesLinkedList.has(n.sequence)) {
									var s = n.conversationID;
									if (this.receivedMessageCount % 40 == 0 && this.tim
										.messageLossController.detectMessageLoss(s, this
											.sequencesLinkedList.data()), null !== this
										.sequencesLinkedList.tail()) {
										var u = this.sequencesLinkedList.tail().value,
											c = n.sequence - u;
										c > 1 && c <= 20 ? this.tim.messageLossController
											.onMessageMaybeLost(s, u + 1, c - 1) : c < -1 &&
											c >= -20 && this.tim.messageLossController
											.onMessageMaybeLost(s, n.sequence + 1, Math.abs(c) -
												1)
									}
									this.sequencesLinkedList.pushIn(n.sequence), this
										._isMessageSentByCurrentInstance(n) || (n
											.conversationType === _n.CONV_SYSTEM && o.push(n), r
											.push(n))
								}
							} else Ms.warn("AVChatRoomHandler._dispatchMessage 未处理的 event 类型: "
								.concat(e[a].event));
						if (o.length > 0 && this.groupController.emitInnerEvent(Xh, {
								result: o,
								eventDataList: [],
								type: "poll"
							}), 0 !== r.length) {
							var l = this.packConversationOption(r);
							l.length > 0 && this.groupController.emitInnerEvent(Jh, {
								eventDataList: l,
								type: "poll"
							}), Ms.debug("AVChatRoomHandler._dispatchNotice nums=".concat(r
								.length));
							var p = this.tim.sumStatController;
							p.addTotalCount(cg), p.addSuccessCount(cg), p.addCost(cg, Date
								.now() - t), this._checkMessageStacked(r), this.groupController
								.emitOuterEvent(yn.MESSAGE_RECEIVED, r)
						}
					}
				}
			}, {
				key: "_checkMessageStacked",
				value: function(e) {
					var t = e.length;
					t >= 100 && (Ms.warn("AVChatRoomHandler.checkMessageStacked 直播群消息堆积数:"
						.concat(e.length,
							'！可能会导致微信小程序渲染时遇到 "Dom limit exceeded" 的错误，建议接入侧此时只渲染最近的10条消息'
							)), this._reportMessageStackedCount < 5 && (new hg(dm)
						.setNetworkType(this.groupController.getNetworkType()).setText(
							"nums=".concat(t, " groupID=").concat(qn(this
								._joinedGroupMap.keys()))).setEnd(), this
						._reportMessageStackedCount += 1))
				}
			}, {
				key: "_isMessageSentByCurrentInstance",
				value: function(e) {
					return !!this.tim.messageController.isMessageSentByCurrentInstance(e)
				}
			}, {
				key: "packMessage",
				value: function(e, t) {
					e.currentUser = this.tim.context.identifier, e.conversationType = 5 === t ?
						_n.CONV_SYSTEM : _n.CONV_GROUP, e.isSystemMessage = !!e.isSystemMessage;
					var n = new _h(e),
						r = this.packElements(e, t);
					return n.setElement(r), n
				}
			}, {
				key: "packElements",
				value: function(e, t) {
					return 4 === t || 6 === t ? (this._updateMemberCountByGroupTips(e), {
						type: _n.MSG_GRP_TIP,
						content: Dn(Dn({}, e.elements), {}, {
							groupProfile: e.groupProfile
						})
					}) : 5 === t ? {
						type: _n.MSG_GRP_SYS_NOTICE,
						content: Dn(Dn({}, e.elements), {}, {
							groupProfile: e.groupProfile
						})
					} : this.tim.bigDataHallwayController.parseElements(e.elements, e.from)
				}
			}, {
				key: "packConversationOption",
				value: function(e) {
					for (var t = new Map, n = 0; n < e.length; n++) {
						var r = e[n],
							o = r.conversationID;
						if (t.has(o)) {
							var i = t.get(o);
							i.lastMessage = r, "in" === r.flow && i.unreadCount++
						} else t.set(o, {
							conversationID: r.conversationID,
							unreadCount: "out" === r.flow ? 0 : 1,
							type: r.conversationType,
							subType: r.conversationSubType,
							lastMessage: r
						})
					}
					return qn(t.values())
				}
			}, {
				key: "_addAVChatRoomID",
				value: function(e) {
					var t = this.tim.loginInfo.avchatroomIDList || [];
					t.includes(e) || (this.tim.context.unlimitedAVChatRoom ? t.push(e) : t
						.splice(0, 1, e), this.tim.loginInfo.avchatroomIDList = t)
				}
			}, {
				key: "_deleteAVChatRoomID",
				value: function(e) {
					var t = this.tim.loginInfo.avchatroomIDList || [],
						n = t.indexOf(e); - 1 !== n && (t.splice(n, 1), this.tim.loginInfo
						.avchatroomIDList = t)
				}
			}, {
				key: "joinAVChatRoomSilently",
				value: function() {
					var e = this,
						t = this.tim.loginInfo.avchatroomIDList || [];
					if (0 !== t.length) {
						var n = new hg(Bg);
						t.forEach((function(t) {
							e.groupController.joinGroup({
								groupID: t
							}).then((function(r) {
								Ms.warn("AVChatRoomHandler.joinAVChatRoomSilently silently join group ok:"
										.concat(t)), n.setCode(r.code)
									.setText("groupID=".concat(t))
									.setNetworkType(e.groupController
										.getNetworkType()).setEnd(!0)
							})).catch((function(r) {
								Ms.warn("AVChatRoomHandler.joinAVChatRoomSilently silently join group failed:"
									.concat(Gs(r))), n.setMessage(""
									.concat(t, "-").concat(JSON
										.stringify(r))).setCode(r
									.code).setNetworkType(e
									.groupController
									.getNetworkType()).setEnd(!0)
							}))
						}))
					}
				}
			}, {
				key: "getGroupOnlineMemberCount",
				value: function(e) {
					var t = this._onlineMemberCountMap.get(e) || {},
						n = Date.now();
					return ou(t) || n - t.lastSyncTime > 1e3 * t.expireTime && n - t
						.latestUpdateTime > 1e4 && n - t.lastReqTime > 3e3 ? (t.lastReqTime = n,
							this._onlineMemberCountMap.set(e, t), this
							._getGroupOnlineMemberCount(e).then((function(e) {
								return new zd({
									memberCount: e.memberCount
								})
							})).catch((function(e) {
								return Xd(e)
							}))) : Jd({
							memberCount: t.memberCount
						})
				}
			}, {
				key: "_getGroupOnlineMemberCount",
				value: function(e) {
					var t = this;
					return this.groupController.request({
						name: "group",
						action: "getOnlineMemberNum",
						param: {
							groupID: e
						}
					}).then((function(n) {
						var r = t._onlineMemberCountMap.get(e) || {},
							o = n.data,
							i = o.onlineMemberNum,
							a = void 0 === i ? 0 : i,
							s = o.expireTime,
							u = void 0 === s ? t.DEFAULT_EXPIRE_TIME : s;
						Ms.log("AVChatRoomHandler._getGroupOnlineMemberCount ok. groupID="
							.concat(e, " memberCount=").concat(a,
								" expireTime=").concat(u));
						var c = Date.now();
						return ou(r) && (r.lastReqTime = c), t._onlineMemberCountMap
							.set(e, Object.assign(r, {
								lastSyncTime: c,
								latestUpdateTime: c,
								memberCount: a,
								expireTime: u
							})), {
								memberCount: a
							}
					})).catch((function(n) {
						return Ms.warn(
								"AVChatRoomHandler._getGroupOnlineMemberCount failed. error:"
								.concat(Gs(n))), new hg(um).setCode(n.code)
							.setMessage("".concat(e, "-").concat(JSON.stringify(n)))
							.setNetworkType(t.groupController.getNetworkType())
							.setEnd(), Promise.reject(n)
					}))
				}
			}, {
				key: "_updateMemberCountByGroupTips",
				value: function(e) {
					var t = e.groupProfile.groupID,
						n = e.elements.onlineMemberInfo,
						r = void 0 === n ? void 0 : n;
					if (void 0 !== r) {
						var o = r.onlineMemberNum,
							i = void 0 === o ? 0 : o,
							a = r.expireTime,
							s = void 0 === a ? this.DEFAULT_EXPIRE_TIME : a,
							u = this._onlineMemberCountMap.get(t) || {},
							c = Date.now();
						ou(u) ? Object.assign(u, {
								lastReqTime: 0,
								lastSyncTime: 0,
								latestUpdateTime: c,
								memberCount: i,
								expireTime: s
							}) : (u.latestUpdateTime = c, u.memberCount = i), Ms.debug(
								"AVChatRoomHandler._updateMemberCountByGroupTips info:", u),
							this._onlineMemberCountMap.set(t, u)
					}
				}
			}, {
				key: "reset",
				value: function(e) {
					if (0 !== this._pollingInstanceMap.size) {
						if (e) Ms.log("AVChatRoomHandler.reset groupID=".concat(e)), this.stop(
								e), this._pollingInstanceMap.delete(e), this._joinedGroupMap
							.delete(e), this._pollingRequestInfoMap.delete(e), this
							._onlineMemberCountMap.delete(e);
						else {
							Ms.log("AVChatRoomHandler.reset all");
							var t, n = Kn(this._pollingInstanceMap.keys());
							try {
								for (n.s(); !(t = n.n()).done;) {
									var r = t.value;
									this.stop(r)
								}
							} catch (o) {
								n.e(o)
							} finally {
								n.f()
							}
							this._pollingInstanceMap.clear(), this._joinedGroupMap.clear(), this
								._pollingRequestInfoMap.clear(), this._onlineMemberCountMap
								.clear()
						}
						this.sequencesLinkedList.reset(), this.receivedMessageCount = 0, this
							._reportMessageStackedCount = 0, this._deleteAVChatRoomID(e)
					}
				}
			}]), e
		}(),
		Fy = "GroupController",
		Vy = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e)).groupMap = new Map, r.groupMemberListMap = new Map, r
					.groupNoticeHandler = new by({
						tim: e,
						groupController: bn(r)
					}), r.groupTipsHandler = new wy({
						tim: e,
						groupController: bn(r)
					}), r.AVChatRoomHandler = new xy({
						tim: e,
						groupController: bn(r)
					}), r._initListeners(), r
			}
			return En(n, [{
				key: "createGroup",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".createGroup");
					if (!["Public", "Private", "ChatRoom", "AVChatRoom"].includes(e.type)) {
						var r = new Vp({
							code: Bp.ILLEGAL_GROUP_TYPE,
							message: Tf
						});
						return Xd(r)
					}
					Js(e.type) && !ks(e.memberList) && e.memberList.length > 0 && (Ms.warn(""
							.concat(n, "创建AVChatRoom时不能添加群成员，自动忽略该字段")), e.memberList =
						void 0), Ws(e.type) || ks(e.joinOption) || (Ms.warn("".concat(n,
							" 创建Work/Meeting/AVChatRoom群时不能设置字段：joinOption，自动忽略该字段")), e
						.joinOption = void 0);
					var o = new hg(Fg);
					return Ms.log("".concat(n)), this.request({
						name: "group",
						action: "create",
						param: e
					}).then((function(r) {
						if (o.setNetworkType(t.getNetworkType()).setText(
								"groupType=".concat(e.type, " groupID=").concat(r
									.data.groupID)).setEnd(), Ms.log("".concat(n,
								" ok. groupID:"), r.data.groupID), e.type === _n
							.GRP_AVCHATROOM) return t.getGroupProfile({
							groupID: r.data.groupID
						});
						t.updateGroupMap([Dn(Dn({}, e), {}, {
							groupID: r.data.groupID
						})]);
						var i = t.tim.createCustomMessage({
							to: r.data.groupID,
							conversationType: _n.CONV_GROUP,
							payload: {
								data: "group_create",
								extension: "".concat(t.tim.context
									.identifier, "创建群组")
							}
						});
						return t.tim.sendMessage(i), t.emitGroupListUpdate(), t
							.getGroupProfile({
								groupID: r.data.groupID
							})
					})).then((function(e) {
						var t = e.data.group;
						return t.selfInfo.messageRemindType = _n
							.MSG_REMIND_ACPT_AND_NOTE, t.selfInfo.role = _n
							.GRP_MBR_ROLE_OWNER, e
					})).catch((function(r) {
						return o.setText("groupType=".concat(e.type)), t
							.probeNetwork().then((function(e) {
								var t = Un(e, 2),
									n = t[0],
									i = t[1];
								o.setError(r, n, i).setEnd()
							})), Ms.error("".concat(n, " error:"), r), Xd(r)
					}))
				}
			}, {
				key: "joinGroup",
				value: function(e) {
					var t = this,
						n = e.groupID,
						r = e.type,
						o = "".concat(Fy, ".joinGroup");
					if (r === _n.GRP_WORK) {
						var i = new Vp({
							code: Bp.CANNOT_JOIN_WORK,
							message: Df
						});
						return Xd(i)
					}
					if (this.hasLocalGroup(n)) {
						if (!this.isLoggedIn()) return Jd({
							status: _n.JOIN_STATUS_ALREADY_IN_GROUP
						});
						var a = new hg(Vg);
						return this.getGroupProfile({
							groupID: n
						}).then((function(e) {
							return a.setNetworkType(t.getNetworkType()).setText(
									"groupID=".concat(n, " joinedStatus=").concat(_n
										.JOIN_STATUS_ALREADY_IN_GROUP)).setEnd(),
								Jd({
									status: _n.JOIN_STATUS_ALREADY_IN_GROUP
								})
						})).catch((function(r) {
							return a.setNetworkType(t.getNetworkType()).setText(
									"groupID=".concat(n, " unjoined")).setEnd(), Ms
								.warn("".concat(o, " ").concat(n,
									" was unjoined, now join!")), t.groupMap.delete(
									n), t.applyJoinGroup(e)
						}))
					}
					return Ms.log("".concat(o, " groupID:"), n), this.isLoggedIn() ? this
						.applyJoinGroup(e) : this.AVChatRoomHandler.joinWithoutAuth(e)
				}
			}, {
				key: "quitGroup",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".quitGroup");
					Ms.log("".concat(n, " groupID:"), e);
					var r = this.AVChatRoomHandler.checkJoinedAVChatRoomByID(e);
					if (!r && !this.hasLocalGroup(e)) {
						var o = new Vp({
							code: Bp.MEMBER_NOT_IN_GROUP,
							message: Rf
						});
						return Xd(o)
					}
					if (r && !this.isLoggedIn()) return Ms.log("".concat(n,
							" anonymously ok. groupID:"), e), this
						.deleteLocalGroupAndConversation(e), this.AVChatRoomHandler.reset(
						e), Jd({
							groupID: e
						});
					var i = new hg(jg);
					return this.request({
						name: "group",
						action: "quitGroup",
						param: {
							groupID: e
						}
					}).then((function() {
						return i.setNetworkType(t.getNetworkType()).setText(
								"groupID=".concat(e)).setEnd(), Ms.log("".concat(n,
								" ok. groupID:"), e), r && t.AVChatRoomHandler
							.reset(e), t.deleteLocalGroupAndConversation(e),
						new zd({
								groupID: e
							})
					})).catch((function(r) {
						return i.setText("groupID=".concat(e)), t.probeNetwork()
							.then((function(e) {
								var t = Un(e, 2),
									n = t[0],
									o = t[1];
								i.setError(r, n, o).setEnd()
							})), Ms.error("".concat(n, " error. error:").concat(Gs(
								r), " groupID:").concat(e)), Xd(r)
					}))
				}
			}, {
				key: "changeGroupOwner",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".changeGroupOwner");
					if (this.hasLocalGroup(e.groupID) && this.getLocalGroupProfile(e.groupID)
						.type === _n.GRP_AVCHATROOM) return Xd(new Vp({
						code: Bp.CANNOT_CHANGE_OWNER_IN_AVCHATROOM,
						message: kf
					}));
					if (e.newOwnerID === this.tim.loginInfo.identifier) return Xd(new Vp({
						code: Bp.CANNOT_CHANGE_OWNER_TO_SELF,
						message: Af
					}));
					var r = new hg(Hg);
					return Ms.log("".concat(n, " groupID:"), e.groupID), this.request({
						name: "group",
						action: "changeGroupOwner",
						param: e
					}).then((function() {
						r.setNetworkType(t.getNetworkType()).setText("groupID="
							.concat(e.groupID)).setEnd(), Ms.log("".concat(n,
							" ok. groupID:"), e.groupID);
						var o = e.groupID,
							i = e.newOwnerID;
						t.groupMap.get(o).ownerID = i;
						var a = t.groupMemberListMap.get(o);
						if (a instanceof Map) {
							var s = a.get(t.tim.loginInfo.identifier);
							ks(s) || (s.updateRole("Member"), t.groupMap.get(o)
								.selfInfo.role = "Member");
							var u = a.get(i);
							ks(u) || u.updateRole("Owner")
						}
						return t.emitGroupListUpdate(!0, !1), new zd({
							group: t.groupMap.get(o)
						})
					})).catch((function(o) {
						return r.setText("groupID=".concat(e.groupID)), t
							.probeNetwork().then((function(e) {
								var t = Un(e, 2),
									n = t[0],
									i = t[1];
								r.setError(o, n, i).setEnd()
							})), Ms.error("".concat(n, " error:").concat(Gs(o),
								" groupID:").concat(e.groupID)), Xd(o)
					}))
				}
			}, {
				key: "dismissGroup",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".dismissGroup");
					if (this.hasLocalGroup(e) && this.getLocalGroupProfile(e).type === _n
						.GRP_WORK) return Xd(new Vp({
						code: Bp.CANNOT_DISMISS_WORK,
						message: Of
					}));
					var r = new hg(Wg);
					return Ms.log("".concat(n, " groupID:").concat(e)), this.request({
						name: "group",
						action: "destroyGroup",
						param: {
							groupID: e
						}
					}).then((function() {
						return r.setNetworkType(t.getNetworkType()).setText(
								"groupID=".concat(e)).setEnd(), Ms.log("".concat(n,
								" ok. groupID:").concat(e)), t
							.deleteLocalGroupAndConversation(e), t
							.checkJoinedAVChatRoomByID(e) && t.AVChatRoomHandler
							.reset(e), new zd({
								groupID: e
							})
					})).catch((function(o) {
						return r.setText("groupID=".concat(e)), t.probeNetwork()
							.then((function(e) {
								var t = Un(e, 2),
									n = t[0],
									i = t[1];
								r.setError(o, n, i).setEnd()
							})), Ms.error("".concat(n, " error:").concat(Gs(o),
								" groupID:").concat(e)), Xd(o)
					}))
				}
			}, {
				key: "updateGroupProfile",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".updateGroupProfile");
					!this.hasLocalGroup(e.groupID) || Ws(this.getLocalGroupProfile(e.groupID)
						.type) || ks(e.joinOption) || (Ms.warn("".concat(n,
							" Work/Meeting/AVChatRoom群不能设置字段：joinOption，自动忽略该字段")), e
						.joinOption = void 0), ks(e.muteAllMembers) || (e.muteAllMembers ? e
						.muteAllMembers = "On" : e.muteAllMembers = "Off");
					var r = new hg(Yg);
					return r.setText(JSON.stringify(e)), Ms.log("".concat(n, " groupID:"), e
						.groupID), this.request({
						name: "group",
						action: "updateGroupProfile",
						param: e
					}).then((function() {
						(r.setNetworkType(t.getNetworkType()).setEnd(), Ms.log(""
								.concat(n, " ok. groupID:"), e.groupID), t
							.hasLocalGroup(e.groupID)) && (t.groupMap.get(e.groupID)
							.updateGroup(e), t._setStorageGroupList());
						return new zd({
							group: t.groupMap.get(e.groupID)
						})
					})).catch((function(o) {
						return t.probeNetwork().then((function(e) {
							var t = Un(e, 2),
								n = t[0],
								i = t[1];
							r.setError(o, n, i).setEnd()
						})), Ms.log("".concat(n, " failed. error:").concat(Gs(
							o), " groupID:").concat(e.groupID)), Xd(o)
					}))
				}
			}, {
				key: "setGroupMemberRole",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".setGroupMemberRole"),
						r = e.groupID,
						o = e.userID,
						i = e.role,
						a = this.groupMap.get(r);
					if (a.selfInfo.role !== _n.GRP_MBR_ROLE_OWNER) return Xd(new Vp({
						code: Bp.NOT_OWNER,
						message: Pf
					}));
					if ([_n.GRP_WORK, _n.GRP_AVCHATROOM].includes(a.type)) return Xd(new Vp({
						code: Bp.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM,
						message: Gf
					}));
					if ([_n.GRP_MBR_ROLE_ADMIN, _n.GRP_MBR_ROLE_MEMBER].indexOf(i) < 0)
					return Xd(new Vp({
							code: Bp.INVALID_MEMBER_ROLE,
							message: Uf
						}));
					if (o === this.tim.loginInfo.identifier) return Xd(new Vp({
						code: Bp.CANNOT_SET_SELF_MEMBER_ROLE,
						message: qf
					}));
					var s = new hg(am);
					return s.setText("groupID=".concat(r, " userID=").concat(o, " role=")
						.concat(i)), Ms.log("".concat(n, " groupID:").concat(r,
						". userID: ").concat(o)), this._modifyGroupMemberInfo({
						groupID: r,
						userID: o,
						role: i
					}).then((function(e) {
						return s.setNetworkType(t.getNetworkType()).setEnd(), Ms
							.log("".concat(n, " ok. groupID:").concat(r,
								". userID: ").concat(o)), new zd({
								group: a,
								member: e
							})
					})).catch((function(e) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								r = n[0],
								o = n[1];
							s.setError(e, r, o).setEnd()
						})), Ms.error("".concat(n, " error:").concat(Gs(e),
							" groupID:").concat(r, " userID:").concat(o)), Xd(e)
					}))
				}
			}, {
				key: "setGroupMemberMuteTime",
				value: function(e) {
					var t = this,
						n = e.groupID,
						r = e.userID,
						o = e.muteTime,
						i = "".concat(Fy, ".setGroupMemberMuteTime");
					if (r === this.tim.loginInfo.identifier) return Xd(new Vp({
						code: Bp.CANNOT_MUTE_SELF,
						message: xf
					}));
					Ms.log("".concat(i, " groupID:").concat(n, ". userID: ").concat(r));
					var a = new hg(om);
					return a.setText("groupID=".concat(n, " userID=").concat(r, " muteTime=")
						.concat(o)), this._modifyGroupMemberInfo({
						groupID: n,
						userID: r,
						muteTime: o
					}).then((function(e) {
						return a.setNetworkType(t.getNetworkType()).setEnd(), Ms
							.log("".concat(i, " ok. groupID:").concat(n,
								". userID: ").concat(r)), new zd({
								group: t.getLocalGroupProfile(n),
								member: e
							})
					})).catch((function(e) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								r = n[0],
								o = n[1];
							a.setError(e, r, o).setEnd()
						})), Ms.error("".concat(i, " error:").concat(Gs(e),
							" groupID:").concat(n, " userID:").concat(r)), Xd(e)
					}))
				}
			}, {
				key: "setMessageRemindType",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".setMessageRemindType"),
						r = new hg(zg);
					r.setText("groupID=".concat(e.groupID, " userID=").concat(e.userID || this
						.tim.loginInfo.identifier)), Ms.log("".concat(n, " groupID:")
						.concat(e.groupID, ". userID: ").concat(e.userID || this.tim
							.loginInfo.identifier));
					var o = e.groupID,
						i = e.messageRemindType;
					return this._modifyGroupMemberInfo({
						groupID: o,
						messageRemindType: i,
						userID: this.tim.loginInfo.identifier
					}).then((function() {
						r.setNetworkType(t.getNetworkType()).setEnd(), Ms.log(""
							.concat(n, " ok. groupID:").concat(e.groupID,
								" userID:").concat(e.userID || t.tim.loginInfo
								.identifier));
						var o = t.getLocalGroupProfile(e.groupID);
						return o && (o.selfInfo.messageRemindType = i), new zd({
							group: o
						})
					})).catch((function(o) {
						return t.probeNetwork().then((function(e) {
								var t = Un(e, 2),
									n = t[0],
									i = t[1];
								r.setError(o, n, i).setEnd()
							})), Ms.error("".concat(n, " error:").concat(Gs(o),
									" groupID:").concat(e.groupID, " userID:")
								.concat(e.userID || t.tim.loginInfo.identifier)),
							Xd(o)
					}))
				}
			}, {
				key: "setGroupMemberNameCard",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".setGroupMemberNameCard"),
						r = e.groupID,
						o = e.userID,
						i = void 0 === o ? this.tim.loginInfo.identifier : o,
						a = e.nameCard;
					Ms.log("".concat(n, " groupID:").concat(r, ". userID: ").concat(i));
					var s = new hg(im);
					return s.setText("groupID=".concat(r, " userID=").concat(i, " nameCard=")
						.concat(a)), this._modifyGroupMemberInfo({
						groupID: r,
						userID: i,
						nameCard: a
					}).then((function(e) {
						Ms.log("".concat(n, " ok. groupID:").concat(r, ". userID: ")
								.concat(i)), s.setNetworkType(t.getNetworkType())
							.setEnd();
						var o = t.getLocalGroupProfile(r);
						return i === t.tim.loginInfo.identifier && o && o
							.setSelfNameCard(a), new zd({
								group: o,
								member: e
							})
					})).catch((function(e) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								r = n[0],
								o = n[1];
							s.setError(e, r, o).setEnd()
						})), Ms.error("".concat(n, " error:").concat(Gs(e),
							" groupID:").concat(r, " userID:").concat(i)), Xd(e)
					}))
				}
			}, {
				key: "setGroupMemberCustomField",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".setGroupMemberCustomField"),
						r = e.groupID,
						o = e.userID,
						i = void 0 === o ? this.tim.loginInfo.identifier : o,
						a = e.memberCustomField;
					Ms.log("".concat(n, " groupID:").concat(r, ". userID: ").concat(i));
					var s = new hg(sm);
					return s.setText("groupID=".concat(r, " userID=").concat(i,
							" memberCustomField=").concat(JSON.stringify(a))), this
						._modifyGroupMemberInfo({
							groupID: r,
							userID: i,
							memberCustomField: a
						}).then((function(e) {
							return s.setNetworkType(t.getNetworkType()).setEnd(), Ms
								.log("".concat(n, " ok. groupID:").concat(r,
									". userID: ").concat(i)), new zd({
									group: t.groupMap.get(r),
									member: e
								})
						})).catch((function(e) {
							return t.probeNetwork().then((function(t) {
								var n = Un(t, 2),
									r = n[0],
									o = n[1];
								s.setError(e, r, o).setEnd()
							})), Ms.error("".concat(n, " error:").concat(Gs(e),
								" groupID:").concat(r, " userID:").concat(i)), Xd(e)
						}))
				}
			}, {
				key: "getGroupList",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".getGroupList"),
						r = new hg(Jg);
					Ms.log("".concat(n));
					var o = {
							introduction: "Introduction",
							notification: "Notification",
							createTime: "CreateTime",
							ownerID: "Owner_Account",
							lastInfoTime: "LastInfoTime",
							memberNum: "MemberNum",
							maxMemberNum: "MaxMemberNum",
							joinOption: "ApplyJoinOption",
							muteAllMembers: "ShutUpAllMember"
						},
						i = ["Type", "Name", "FaceUrl", "NextMsgSeq", "LastMsgTime"];
					return e && e.groupProfileFilter && e.groupProfileFilter.forEach((function(
						e) {
						o[e] && i.push(o[e])
					})), this.request({
						name: "group",
						action: "list",
						param: {
							responseFilter: {
								groupBaseInfoFilter: i,
								selfInfoFilter: ["Role", "JoinTime", "MsgFlag"]
							}
						}
					}).then((function(e) {
						var o = e.data.groups;
						return Ms.log("".concat(n, " ok. nums=").concat(o.length)),
							t._groupListTreeShaking(o), t.updateGroupMap(o), r
							.setNetworkType(t.getNetworkType()).setText("".concat(o
								.length, "-afterTreeshaking-").concat(t.groupMap
								.size)).setEnd(), t.tempConversationList && (Ms.log(
									"".concat(n,
										" update last message with tempConversationList, nums="
										).concat(t.tempConversationList.length)), t
								._handleUpdateGroupLastMessage({
									data: t.tempConversationList
								}), t.tempConversationList = null), t
							.emitGroupListUpdate(), new zd({
								groupList: t.getLocalGroups()
							})
					})).catch((function(e) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								o = n[0],
								i = n[1];
							r.setError(e, o, i).setEnd()
						})), Ms.error("".concat(n, " error:"), e), Xd(e)
					}))
				}
			}, {
				key: "getGroupMemberList",
				value: function(e) {
					var t = this,
						n = e.groupID,
						r = e.offset,
						o = void 0 === r ? 0 : r,
						i = e.count,
						a = void 0 === i ? 15 : i,
						s = "".concat(Fy, ".getGroupMemberList"),
						u = new hg(em);
					Ms.log("".concat(s, " groupID: ").concat(n, " offset: ").concat(o,
						" count: ").concat(a));
					var c = [];
					return this.request({
						name: "group",
						action: "getGroupMemberList",
						param: {
							groupID: n,
							offset: o,
							limit: a > 100 ? 100 : a,
							memberInfoFilter: ["Role", "NameCard", "ShutUpUntil"]
						}
					}).then((function(e) {
						var r = e.data,
							o = r.members,
							i = r.memberNum;
						return Ds(o) && 0 !== o.length ? (t.hasLocalGroup(n) && (t
								.getLocalGroupProfile(n).memberNum = i), c = t
							._updateLocalGroupMemberMap(n, o), t.tim
							.getUserProfile({
								userIDList: o.map((function(e) {
									return e.userID
								})),
								tagList: [Mp.NICK, Mp.AVATAR]
							})) : Promise.resolve([])
					})).then((function(e) {
						var r = e.data;
						if (!Ds(r) || 0 === r.length) return Jd({
							memberList: []
						});
						var i = r.map((function(e) {
							return {
								userID: e.userID,
								nick: e.nick,
								avatar: e.avatar
							}
						}));
						return t._updateLocalGroupMemberMap(n, i), u.setNetworkType(
								t.getNetworkType()).setText("groupID=".concat(n,
								" offset=").concat(o, " count=").concat(a))
						.setEnd(), Ms.log("".concat(s, " ok.")), new zd({
								memberList: c
							})
					})).catch((function(e) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								r = n[0],
								o = n[1];
							u.setError(e, r, o).setEnd()
						})), Ms.error("".concat(s, " error:"), e), Xd(e)
					}))
				}
			}, {
				key: "getLocalGroups",
				value: function() {
					return qn(this.groupMap.values())
				}
			}, {
				key: "getLocalGroupProfile",
				value: function(e) {
					return this.groupMap.get(e)
				}
			}, {
				key: "hasLocalGroup",
				value: function(e) {
					return this.groupMap.has(e)
				}
			}, {
				key: "getLocalGroupMemberInfo",
				value: function(e, t) {
					return this.groupMemberListMap.has(e) ? this.groupMemberListMap.get(e).get(
						t) : null
				}
			}, {
				key: "setLocalGroupMember",
				value: function(e, t) {
					if (this.groupMemberListMap.has(e)) this.groupMemberListMap.get(e).set(t
						.userID, t);
					else {
						var n = (new Map).set(t.userID, t);
						this.groupMemberListMap.set(e, n)
					}
				}
			}, {
				key: "hasLocalGroupMember",
				value: function(e, t) {
					return this.groupMemberListMap.has(e) && this.groupMemberListMap.get(e).has(
						t)
				}
			}, {
				key: "hasLocalGroupMemberMap",
				value: function(e) {
					return this.groupMemberListMap.has(e)
				}
			}, {
				key: "getGroupProfile",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".getGroupProfile"),
						r = new hg(Xg);
					Ms.log("".concat(n, " groupID:"), e.groupID);
					var o = e.groupID,
						i = e.groupCustomFieldFilter,
						a = {
							groupIDList: [o],
							responseFilter: {
								groupBaseInfoFilter: ["Type", "Name", "Introduction",
									"Notification", "FaceUrl", "Owner_Account",
									"CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime",
									"MemberNum", "MaxMemberNum", "ApplyJoinOption",
									"NextMsgSeq", "ShutUpAllMember"
								],
								groupCustomFieldFilter: i
							}
						};
					return this.getGroupProfileAdvance(a).then((function(i) {
						var a, s = i.data,
							u = s.successGroupList,
							c = s.failureGroupList;
						return Ms.log("".concat(n, " ok. groupID:").concat(e
							.groupID)), c.length > 0 ? Xd(c[0]) : (Js(u[0]
							.type) && !t.hasLocalGroup(o) ? a = new iy(u[0]) : (
								t.updateGroupMap(u), a = t.getLocalGroupProfile(
									o)), r.setNetworkType(t.getNetworkType())
							.setText("groupID=".concat(a.groupID, " type=")
								.concat(a.type, " muteAllMembers=").concat(a
									.muteAllMembers, " ownerID=").concat(a
									.ownerID)).setEnd(), a && a.selfInfo && !a
							.selfInfo.nameCard ? t.updateSelfInfo(a).then((
								function(e) {
									return new zd({
										group: e
									})
								})) : new zd({
								group: a
							}))
					})).catch((function(o) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								i = n[0],
								a = n[1];
							r.setError(o, i, a).setText("groupID="
								.concat(e.groupID)).setEnd()
						})), Ms.error("".concat(n, " error:").concat(Gs(o),
							" groupID:").concat(e.groupID)), Xd(o)
					}))
				}
			}, {
				key: "getGroupMemberProfile",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".getGroupMemberProfile"),
						r = new hg(tm);
					r.setText(e.userIDList.length > 5 ? "userIDList.length=".concat(e.userIDList
						.length) : "userIDList=".concat(e.userIDList)), Ms.log("".concat(n,
						" groupID:").concat(e.groupID, " userIDList:").concat(e
						.userIDList.join(","))), e.userIDList.length > 50 && (e.userIDList =
						e.userIDList.slice(0, 50));
					var o = e.groupID,
						i = e.userIDList;
					return this._getGroupMemberProfileAdvance(Dn(Dn({}, e), {}, {
						userIDList: i
					})).then((function(e) {
						var n = e.data.members;
						return Ds(n) && 0 !== n.length ? (t
							._updateLocalGroupMemberMap(o, n), t.tim
							.getUserProfile({
								userIDList: n.map((function(e) {
									return e.userID
								})),
								tagList: [Mp.NICK, Mp.AVATAR]
							})) : Jd([])
					})).then((function(e) {
						var n = e.data.map((function(e) {
							return {
								userID: e.userID,
								nick: e.nick,
								avatar: e.avatar
							}
						}));
						t._updateLocalGroupMemberMap(o, n);
						var a = i.filter((function(e) {
							return t.hasLocalGroupMember(o, e)
						})).map((function(e) {
							return t.getLocalGroupMemberInfo(o, e)
						}));
						return r.setNetworkType(t.getNetworkType()).setEnd(),
							new zd({
								memberList: a
							})
					}))
				}
			}, {
				key: "_getGroupMemberProfileAdvance",
				value: function(e) {
					return this.request({
						name: "group",
						action: "getGroupMemberProfile",
						param: Dn(Dn({}, e), {}, {
							memberInfoFilter: e.memberInfoFilter ? e
								.memberInfoFilter : ["Role", "JoinTime",
									"NameCard", "ShutUpUntil"
								]
						})
					})
				}
			}, {
				key: "updateSelfInfo",
				value: function(e) {
					var t = "".concat(Fy, ".updateSelfInfo"),
						n = e.groupID;
					Ms.log("".concat(t, " groupID:"), n);
					var r = {
						groupID: n,
						userIDList: [this.tim.loginInfo.identifier]
					};
					return this.getGroupMemberProfile(r).then((function(r) {
						var o = r.data.memberList;
						return Ms.log("".concat(t, " ok. groupID:"), n), e && 0 !==
							o.length && e.updateSelfInfo(o[0]), e
					}))
				}
			}, {
				key: "addGroupMember",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".addGroupMember"),
						r = new hg(nm);
					r.setText("groupID=".concat(e.groupID));
					var o = this.getLocalGroupProfile(e.groupID);
					if (Js(o.type)) {
						var i = new Vp({
							code: Bp.CANNOT_ADD_MEMBER_IN_AVCHATROOM,
							message: Lf
						});
						return r.setCode(Bp.CANNOT_ADD_MEMBER_IN_AVCHATROOM).setMessage(Lf)
							.setNetworkType(this.getNetworkType()).setText("groupID=".concat(e
								.groupID, " groupType=").concat(o.type)).setEnd(), Xd(i)
					}
					return e.userIDList = e.userIDList.map((function(e) {
						return {
							userID: e
						}
					})), Ms.log("".concat(n, " groupID:"), e.groupID), this.request({
						name: "group",
						action: "addGroupMember",
						param: e
					}).then((function(i) {
						var a = i.data.members;
						r.setNetworkType(t.getNetworkType()).setText("groupID="
							.concat(e.groupID)).setEnd(), Ms.log("".concat(n,
							" ok. groupID:"), e.groupID);
						var s = a.filter((function(e) {
								return 1 === e.result
							})).map((function(e) {
								return e.userID
							})),
							u = a.filter((function(e) {
								return 0 === e.result
							})).map((function(e) {
								return e.userID
							})),
							c = a.filter((function(e) {
								return 2 === e.result
							})).map((function(e) {
								return e.userID
							}));
						return 0 === s.length ? new zd({
							successUserIDList: s,
							failureUserIDList: u,
							existedUserIDList: c
						}) : (o.memberNum += s.length, new zd({
							successUserIDList: s,
							failureUserIDList: u,
							existedUserIDList: c,
							group: o
						}))
					})).catch((function(o) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								i = n[0],
								a = n[1];
							r.setError(o, i, a).setText("groupID="
								.concat(e.groupID)).setEnd()
						})), Ms.error("".concat(n, " error:").concat(Gs(o),
							" groupID:").concat(e.groupID)), Xd(o)
					}))
				}
			}, {
				key: "deleteGroupMember",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".deleteGroupMember"),
						r = new hg(rm);
					r.setText(e.userIDList.length > 5 ? "userIDList.length=".concat(e.userIDList
						.length) : "userIDList=".concat(e.userIDList)), Ms.log("".concat(n,
						" groupID:").concat(e.groupID, " userIDList:").concat(e
						.userIDList));
					var o = this.getLocalGroupProfile(e.groupID);
					return o.type === _n.GRP_AVCHATROOM ? Xd(new Vp({
						code: Bp.CANNOT_KICK_MEMBER_IN_AVCHATROOM,
						message: bf
					})) : this.request({
						name: "group",
						action: "deleteGroupMember",
						param: e
					}).then((function() {
						return r.setNetworkType(t.getNetworkType()).setEnd(), Ms
							.log("".concat(n, " ok")), o.memberNum--, t
							.deleteLocalGroupMembers(e.groupID, e.userIDList),
							new zd({
								group: o,
								userIDList: e.userIDList
							})
					})).catch((function(o) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								i = n[0],
								a = n[1];
							r.setError(o, i, a).setText("groupID="
								.concat(e.groupID)).setEnd()
						})), Ms.error("".concat(n, " error:").concat(Gs(o),
							" groupID:").concat(e.groupID)), Xd(o)
					}))
				}
			}, {
				key: "searchGroupByID",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".searchGroupByID"),
						r = {
							groupIDList: [e]
						},
						o = new hg(Kg);
					return o.setText("groupID=".concat(e)), Ms.log("".concat(n, " groupID:")
						.concat(e)), this.request({
						name: "group",
						action: "searchGroupByID",
						param: r
					}).then((function(r) {
						var i = r.data.groupProfile;
						if (i[0].errorCode !== Ju.SUCCESS) throw new Vp({
							code: i[0].errorCode,
							message: i[0].errorInfo
						});
						return o.setNetworkType(t.getNetworkType()).setEnd(), Ms
							.log("".concat(n, " ok. groupID:").concat(e)), new zd({
								group: new iy(i[0])
							})
					})).catch((function(r) {
						return t.probeNetwork().then((function(e) {
							var t = Un(e, 2),
								n = t[0],
								i = t[1];
							o.setError(r, n, i).setEnd()
						})), Ms.warn("".concat(n, " error:").concat(Gs(r),
							" groupID:").concat(e)), Xd(r)
					}))
				}
			}, {
				key: "applyJoinGroup",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".applyJoinGroup"),
						r = new hg(Vg);
					return this.request({
						name: "group",
						action: "applyJoinGroup",
						param: e
					}).then((function(o) {
						var i = o.data,
							a = i.joinedStatus,
							s = i.longPollingKey;
						switch (r.setNetworkType(t.getNetworkType()).setText(
							"groupID=".concat(e.groupID, " joinedStatus=")
							.concat(a)).setEnd(), Ms.log("".concat(n,
								" ok. groupID:").concat(e.groupID,
								" joinedStatus:").concat(a, " longPollingKey:")
							.concat(s)), a) {
							case Yu.WAIT_APPROVAL:
								return new zd({
									status: Yu.WAIT_APPROVAL
								});
							case Yu.SUCCESS:
								return t.getGroupProfile({
									groupID: e.groupID
								}).then((function(n) {
									var r = n.data.group,
										o = {
											status: Yu.SUCCESS,
											group: r
										};
									return ks(s) ? (t
										.emitGroupListUpdate(!0, !
										1), new zd(o)) : (t
										.emitInnerEvent(Ad, e
											.groupID), t
										.AVChatRoomHandler
										.startRunLoop({
											longPollingKey: s,
											group: r
										}))
								}));
							default:
								var u = new Vp({
									code: Bp.JOIN_GROUP_FAIL,
									message: Nf
								});
								return Ms.error("".concat(n, " error:").concat(Gs(
									u), " groupID:").concat(e.groupID)), Xd(u)
						}
					})).catch((function(o) {
						return r.setText("groupID=".concat(e.groupID)), t
							.probeNetwork().then((function(e) {
								var t = Un(e, 2),
									n = t[0],
									i = t[1];
								r.setError(o, n, i).setEnd()
							})), Ms.error("".concat(n, " error:").concat(Gs(o),
								" groupID:").concat(e.groupID)), Xd(o)
					}))
				}
			}, {
				key: "applyJoinAVChatRoom",
				value: function(e) {
					return this.AVChatRoomHandler.applyJoinAVChatRoom(e)
				}
			}, {
				key: "handleGroupApplication",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".handleGroupApplication"),
						r = e.message.payload,
						o = r.groupProfile.groupID,
						i = r.authentication,
						a = r.messageKey,
						s = r.operatorID,
						u = new hg($g);
					return u.setText("groupID=".concat(o)), Ms.log("".concat(n, " groupID:"),
						o), this.request({
							name: "group",
							action: "handleApplyJoinGroup",
							param: Dn(Dn({}, e), {}, {
								applicant: s,
								groupID: o,
								authentication: i,
								messageKey: a
							})
						}).then((function() {
							return u.setNetworkType(t.getNetworkType()).setEnd(), Ms
								.log("".concat(n, " ok. groupID:"), o), t
								.deleteGroupSystemNotice({
									messageList: [e.message]
								}), new zd({
									group: t.getLocalGroupProfile(o)
								})
						})).catch((function(e) {
							return t.probeNetwork().then((function(t) {
								var n = Un(t, 2),
									r = n[0],
									o = n[1];
								u.setError(e, r, o).setEnd()
							})), Ms.error("".concat(n, " error. error:").concat(Gs(
								e), " groupID:").concat(o)), Xd(e)
						}))
				}
			}, {
				key: "deleteGroupSystemNotice",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".deleteGroupSystemNotice");
					return Ds(e.messageList) && 0 !== e.messageList.length ? (Ms.log("".concat(
						n) + e.messageList.map((function(e) {
						return e.ID
					}))), this.request({
						name: "group",
						action: "deleteGroupSystemNotice",
						param: {
							messageListToDelete: e.messageList.map((function(e) {
								return {
									from: _n.CONV_SYSTEM,
									messageSeq: e.clientSequence,
									messageRandom: e.random
								}
							}))
						}
					}).then((function() {
						return Ms.log("".concat(n, " ok")), e.messageList
							.forEach((function(e) {
								t.tim.messageController
									.deleteLocalMessage(e)
							})), new zd
					})).catch((function(e) {
						return Ms.error("".concat(n, " error:"), e), Xd(e)
					}))) : Jd()
				}
			}, {
				key: "getGroupProfileAdvance",
				value: function(e) {
					var t = "".concat(Fy, ".getGroupProfileAdvance");
					return Ds(e.groupIDList) && e.groupIDList.length > 50 && (Ms.warn("".concat(
						t, " 获取群资料的数量不能超过50个")), e.groupIDList.length = 50), Ms.log(""
						.concat(t, " groupIDList:"), e.groupIDList), this.request({
						name: "group",
						action: "query",
						param: e
					}).then((function(e) {
						Ms.log("".concat(t, " ok."));
						var n = e.data.groups,
							r = n.filter((function(e) {
								return ks(e.errorCode) || e.errorCode === Ju
									.SUCCESS
							})),
							o = n.filter((function(e) {
								return e.errorCode && e.errorCode !== Ju
									.SUCCESS
							})).map((function(e) {
								return new Vp({
									code: e.errorCode,
									message: e.errorInfo,
									data: {
										groupID: e.groupID
									}
								})
							}));
						return new zd({
							successGroupList: r,
							failureGroupList: o
						})
					})).catch((function(n) {
						return Ms.error("".concat(t, " error:").concat(Gs(n),
							" groupIDList:").concat(e.groupIDList)), Xd(n)
					}))
				}
			}, {
				key: "_deleteLocalGroup",
				value: function(e) {
					return this.groupMap.delete(e), this.groupMemberListMap.delete(e), this
						._setStorageGroupList(), this.groupMap.has(e) && this.groupMemberListMap
						.has(e)
				}
			}, {
				key: "_initGroupList",
				value: function() {
					var e = this,
						t = "".concat(Fy, "._initGroupList"),
						n = new hg(Qg);
					Ms.time(pg), Ms.log("".concat(t));
					var r = this._getStorageGroupList();
					Ds(r) && r.length > 0 ? (r.forEach((function(t) {
							e.groupMap.set(t.groupID, new iy(t))
						})), this.emitGroupListUpdate(!0, !1), n.setNetworkType(this
							.getNetworkType()).setText(this.groupMap.size).setEnd()) : n
						.setNetworkType(this.getNetworkType()).setText(0).setEnd(), this
						.triggerReady(), Ms.log("".concat(t, " ok. initCost=").concat(Ms
							.timeEnd(pg), "ms")), this.getGroupList()
				}
			}, {
				key: "_initListeners",
				value: function() {
					var e = this.tim.innerEmitter;
					e.once(Bh, this._initGroupList, this), e.on(Sd, this
						._handleUpdateGroupLastMessage, this), e.on(Jh, this
						._handleReceivedGroupMessage, this), e.on(kd, this
						._handleProfileUpdated, this)
				}
			}, {
				key: "emitGroupListUpdate",
				value: function() {
					var e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0],
						t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1],
						n = this.getLocalGroups(),
						r = JSON.parse(JSON.stringify(n));
					t && this.emitInnerEvent(yd, r), e && this.emitOuterEvent(yn
						.GROUP_LIST_UPDATED, n)
				}
			}, {
				key: "_handleReceivedGroupMessage",
				value: function(e) {
					var t = this,
						n = e.data.eventDataList;
					Array.isArray(n) && n.forEach((function(e) {
						var n = e.conversationID.replace(_n.CONV_GROUP, "");
						t.groupMap.has(n) && (t.groupMap.get(n).nextMessageSeq = e
							.lastMessage.sequence + 1)
					}))
				}
			}, {
				key: "_onReceivedGroupSystemNotice",
				value: function(e) {
					var t = e.data;
					this.groupNoticeHandler._onReceivedGroupNotice(t)
				}
			}, {
				key: "_handleUpdateGroupLastMessage",
				value: function(e) {
					var t = "".concat(Fy, "._handleUpdateGroupLastMessage"),
						n = e.data;
					if (Ms.log("".concat(t, " convNums=").concat(n.length, " groupNums=")
							.concat(this.groupMap.size)), 0 !== this.groupMap.size) {
						for (var r, o, i, a = !1, s = 0, u = n.length; s < u; s++)(r = n[s])
							.conversationID && r.type !== _n.CONV_GROUP && (o = r.conversationID
								.split(/^GROUP/)[1], (i = this.getLocalGroupProfile(o)) && (i
									.lastMessage = r.lastMessage, a = !0));
						a && (this.groupMap = this._sortLocalGroupList(this.groupMap), this
							.emitGroupListUpdate(!0, !1))
					} else this.tempConversationList = n
				}
			}, {
				key: "_sortLocalGroupList",
				value: function(e) {
					var t = qn(e).filter((function(e) {
						var t = Un(e, 2);
						t[0];
						return !ou(t[1].lastMessage)
					}));
					return t.sort((function(e, t) {
						return t[1].lastMessage.lastTime - e[1].lastMessage.lastTime
					})), new Map([].concat(qn(t), qn(e)))
				}
			}, {
				key: "_getStorageGroupList",
				value: function() {
					return this.tim.storage.getItem("groupMap")
				}
			}, {
				key: "_setStorageGroupList",
				value: function() {
					var e = this.getLocalGroups().filter((function(e) {
						var t = e.type;
						return !Js(t)
					})).slice(0, 20).map((function(e) {
						return {
							groupID: e.groupID,
							name: e.name,
							avatar: e.avatar,
							type: e.type
						}
					}));
					this.tim.storage.setItem("groupMap", e)
				}
			}, {
				key: "updateGroupMap",
				value: function(e) {
					var t = this;
					e.forEach((function(e) {
						t.groupMap.has(e.groupID) ? t.groupMap.get(e.groupID)
							.updateGroup(e) : t.groupMap.set(e.groupID, new iy(e))
					})), this._setStorageGroupList()
				}
			}, {
				key: "_updateLocalGroupMemberMap",
				value: function(e, t) {
					var n = this;
					return Ds(t) && 0 !== t.length ? t.map((function(t) {
						return n.hasLocalGroupMember(e, t.userID) ? n
							.getLocalGroupMemberInfo(e, t.userID).updateMember(t) :
							n.setLocalGroupMember(e, new Ly(t)), n
							.getLocalGroupMemberInfo(e, t.userID)
					})) : []
				}
			}, {
				key: "deleteLocalGroupMembers",
				value: function(e, t) {
					var n = this.groupMemberListMap.get(e);
					n && t.forEach((function(e) {
						n.delete(e)
					}))
				}
			}, {
				key: "_modifyGroupMemberInfo",
				value: function(e) {
					var t = this,
						n = e.groupID,
						r = e.userID;
					return this.request({
						name: "group",
						action: "modifyGroupMemberInfo",
						param: e
					}).then((function() {
						if (t.hasLocalGroupMember(n, r)) {
							var o = t.getLocalGroupMemberInfo(n, r);
							return ks(e.muteTime) || o.updateMuteUntil(e.muteTime),
								ks(e.role) || o.updateRole(e.role), ks(e
								.nameCard) || o.updateNameCard(e.nameCard), ks(e
									.memberCustomField) || o
								.updateMemberCustomField(e.memberCustomField), o
						}
						return t.getGroupMemberProfile({
							groupID: n,
							userIDList: [r]
						}).then((function(e) {
							return Un(e.data.memberList, 1)[0]
						}))
					}))
				}
			}, {
				key: "_groupListTreeShaking",
				value: function(e) {
					for (var t = new Map(qn(this.groupMap)), n = 0, r = e.length; n < r; n++) t
						.delete(e[n].groupID);
					this.AVChatRoomHandler.hasJoinedAVChatRoom() && this.AVChatRoomHandler
						.getJoinedAVChatRoom().forEach((function(e) {
							t.delete(e)
						}));
					for (var o = qn(t.keys()), i = 0, a = o.length; i < a; i++) this.groupMap
						.delete(o[i])
				}
			}, {
				key: "_handleProfileUpdated",
				value: function(e) {
					for (var t = this, n = e.data, r = function(e) {
							var r = n[e];
							t.groupMemberListMap.forEach((function(e) {
								e.has(r.userID) && e.get(r.userID)
							.updateMember({
									nick: r.nick,
									avatar: r.avatar
								})
							}))
						}, o = 0; o < n.length; o++) r(o)
				}
			}, {
				key: "getJoinedAVChatRoom",
				value: function() {
					return this.AVChatRoomHandler.getJoinedAVChatRoom()
				}
			}, {
				key: "deleteLocalGroupAndConversation",
				value: function(e) {
					this._deleteLocalGroup(e), this.tim.conversationController
						.deleteLocalConversation("GROUP".concat(e)), this.emitGroupListUpdate(!
							0, !1)
				}
			}, {
				key: "checkJoinedAVChatRoomByID",
				value: function(e) {
					return this.AVChatRoomHandler.checkJoinedAVChatRoomByID(e)
				}
			}, {
				key: "getGroupLastSequence",
				value: function(e) {
					var t = this,
						n = "".concat(Fy, ".getGroupLastSequence"),
						r = new hg(Zg),
						o = 0;
					if (this.hasLocalGroup(e)) {
						var i = this.getLocalGroupProfile(e);
						if (i.lastMessage.lastSequence > 0) return o = i.lastMessage
							.lastSequence, Ms.log("".concat(n, " got lastSequence=").concat(
								o,
								" from local group profile[lastMessage.lastSequence]. groupID="
								).concat(e)), r.setNetworkType(this.getNetworkType())
							.setText("got lastSequence=".concat(o,
								" from local group profile[lastMessage.lastSequence]. groupID="
								).concat(e)).setEnd(), Promise.resolve(o);
						if (i.nextMessageSeq > 1) return o = i.nextMessageSeq - 1, Ms.log(""
								.concat(n, " got lastSequence=").concat(o,
									" from local group profile[nextMessageSeq]. groupID=")
								.concat(e)), r.setNetworkType(this.getNetworkType())
							.setText("got lastSequence=".concat(o,
									" from local group profile[nextMessageSeq]. groupID=")
								.concat(e)).setEnd(), Promise.resolve(o)
					}
					var a = "GROUP".concat(e),
						s = this.tim.conversationController.getLocalConversation(a);
					if (s && s.lastMessage.lastSequence) return o = s.lastMessage.lastSequence,
						Ms.log("".concat(n, " got lastSequence=").concat(o,
							" from local conversation profile[lastMessage.lastSequence]. groupID="
							).concat(e)), r.setNetworkType(this.getNetworkType()).setText(
							"got lastSequence=".concat(o,
								" from local conversation profile[lastMessage.lastSequence]. groupID="
								).concat(e)).setEnd(), Promise.resolve(o);
					var u = {
						groupIDList: [e],
						responseFilter: {
							groupBaseInfoFilter: ["NextMsgSeq"]
						}
					};
					return this.getGroupProfileAdvance(u).then((function(i) {
						var a = i.data.successGroupList;
						return ou(a) ? Ms.log("".concat(n,
								" successGroupList is empty. groupID=").concat(
								e)) : (o = a[0].nextMessageSeq - 1, Ms.log(""
								.concat(n, " got lastSequence=").concat(o,
									" from getGroupProfileAdvance. groupID=")
								.concat(e))), r.setNetworkType(t.getNetworkType())
							.setText("got lastSequence=".concat(o,
									" from getGroupProfileAdvance. groupID=")
								.concat(e)).setEnd(), o
					})).catch((function(o) {
						return t.probeNetwork().then((function(t) {
							var n = Un(t, 2),
								i = n[0],
								a = n[1];
							r.setError(o, i, a).setText(
								"get lastSequence failed from getGroupProfileAdvance. groupID="
								.concat(e)).setEnd()
						})), Ms.warn("".concat(n, " failed. ").concat(o)), Xd(o)
					}))
				}
			}, {
				key: "getGroupOnlineMemberCount",
				value: function(e) {
					return this.AVChatRoomHandler.checkJoinedAVChatRoomByID(e) ? this
						.AVChatRoomHandler.getGroupOnlineMemberCount(e) : Jd({
							memberCount: 0
						})
				}
			}, {
				key: "reset",
				value: function() {
					this.groupMap.clear(), this.groupMemberListMap.clear(), this.resetReady(),
						this.groupNoticeHandler.reset(), this.AVChatRoomHandler.reset(), this
						.tim.innerEmitter.once(Bh, this._initGroupList, this)
				}
			}]), n
		}(Kd),
		By = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				In(this, n), (r = t.call(this, e)).REALTIME_MESSAGE_TIMEOUT = 3e5, r.LONGPOLLING_ID_TIMEOUT =
					3e5, r._currentState = _n.NET_STATE_CONNECTED, r._status = {
						OPENIM: {
							lastResponseReceivedTime: 0,
							jitterCount: 0,
							failedCount: 0
						},
						AVCHATROOM: {
							lastResponseReceivedTime: 0,
							jitterCount: 0,
							failedCount: 0
						}
					};
				var o = r.tim.innerEmitter;
				return o.on(Zh, r._onGetLongPollIDFailed, bn(r)), o.on(td, r._onOpenIMResponseOK, bn(r)), o.on(
					ed, r._onOpenIMRequestFailed, bn(r)), o.on(vd, r._onAVChatroomResponseOK, bn(r)), o.on(
					md, r._onAVChatroomRequestFailed, bn(r)), r
			}
			return En(n, [{
				key: "_onGetLongPollIDFailed",
				value: function() {
					this._currentState !== _n.NET_STATE_DISCONNECTED && this
						._emitNetStateChangeEvent(_n.NET_STATE_DISCONNECTED)
				}
			}, {
				key: "_onOpenIMResponseOK",
				value: function() {
					this._onResponseOK("OPENIM")
				}
			}, {
				key: "_onOpenIMRequestFailed",
				value: function() {
					this._onRequestFailed("OPENIM")
				}
			}, {
				key: "_onAVChatroomResponseOK",
				value: function() {
					this.isLoggedIn() || this._onResponseOK("AVCHATROOM")
				}
			}, {
				key: "_onAVChatroomRequestFailed",
				value: function() {
					this.isLoggedIn() || this._onRequestFailed("AVCHATROOM")
				}
			}, {
				key: "_onResponseOK",
				value: function(e) {
					var t = this._status[e],
						n = Date.now();
					if (0 !== t.lastResponseReceivedTime) {
						var r = n - t.lastResponseReceivedTime;
						Ms.debug("StatusController._onResponseOK key=".concat(e,
									" currentState=").concat(this._currentState, " interval=")
								.concat(r, " failedCount=").concat(t.failedCount,
									" jitterCount=").concat(t.jitterCount)), t.failedCount >
							0 && (t.failedCount = 0, t.jitterCount += 1, this._currentState !==
								_n.NET_STATE_CONNECTED && this._emitNetStateChangeEvent(_n
									.NET_STATE_CONNECTED));
						r <= this.LONGPOLLING_ID_TIMEOUT ? t.jitterCount >= 3 && (new hg(pm)
								.setText("".concat(e, "-").concat(r, "-").concat(t.jitterCount))
								.setNetworkType(this.getNetworkType()).setEnd(), t.jitterCount =
								0) : (new hg(fm).setText("".concat(e, "-").concat(r))
								.setNetworkType(this.getNetworkType()).setEnd(), Ms.warn(
									"StatusController._onResponseOK, sdk reload. key=".concat(e,
										" interval=").concat(r,
										"ms. https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/module-EVENT.html#.SDK_RELOAD"
										)), this.emitInnerEvent(Nd)), t
							.lastResponseReceivedTime = n
					} else t.lastResponseReceivedTime = n
				}
			}, {
				key: "_onRequestFailed",
				value: function(e) {
					var t = this,
						n = this._status[e];
					Date.now() - n.lastResponseReceivedTime >= this.LONGPOLLING_ID_TIMEOUT ?
						this._currentState !== _n.NET_STATE_DISCONNECTED && (Ms.warn(
								"StatusController._onRequestFailed, disconnected, longpolling unavailable more than 5min. key="
								.concat(e, " networkType=").concat(this.getNetworkType())), this
							._emitNetStateChangeEvent(_n.NET_STATE_DISCONNECTED)) : (n
							.failedCount += 1, n.failedCount > 5 ? this.probeNetwork().then((
								function(r) {
									var o = Un(r, 2),
										i = o[0],
										a = o[1];
									i ? (t._currentState !== _n.NET_STATE_CONNECTING && t
											._emitNetStateChangeEvent(_n
												.NET_STATE_CONNECTING), Ms.warn(
												"StatusController._onRequestFailed, connecting, network jitter. key="
												.concat(e, " networkType=").concat(a))) : (t
											._currentState !== _n.NET_STATE_DISCONNECTED &&
											t._emitNetStateChangeEvent(_n
												.NET_STATE_DISCONNECTED), Ms.warn(
												"StatusController._onRequestFailed, disconnected, longpolling unavailable. key="
												.concat(e, " networkType=").concat(a))), n
										.failedCount = 0, n.jitterCount = 0
								})) : this._currentState === _n.NET_STATE_CONNECTED && this
							._emitNetStateChangeEvent(_n.NET_STATE_CONNECTING))
				}
			}, {
				key: "_emitNetStateChangeEvent",
				value: function(e) {
					Ms.log("StatusController._emitNetStateChangeEvent net state changed from "
							.concat(this._currentState, " to ").concat(e)), this._currentState =
						e, this.emitOuterEvent(yn.NET_STATE_CHANGE, {
							state: e
						})
				}
			}, {
				key: "reset",
				value: function() {
					Ms.log("StatusController.reset"), this._currentState = _n
						.NET_STATE_CONNECTED, this._status = {
							OPENIM: {
								lastResponseReceivedTime: 0,
								jitterCount: 0,
								failedCount: 0
							},
							AVCHATROOM: {
								lastResponseReceivedTime: 0,
								jitterCount: 0,
								failedCount: 0
							}
						}
				}
			}]), n
		}(Kd);

	function jy() {
		return null
	}
	var Ky = function() {
			function e(t) {
				In(this, e), this.tim = t, this.storageQueue = new Map, this.checkTimes = 0, this.checkTimer =
					setInterval(this._onCheckTimer.bind(this), 1e3), this._errorTolerantHandle()
			}
			return En(e, [{
				key: "_errorTolerantHandle",
				value: function() {
					!Fa && ks(window.localStorage) && (this.getItem = jy, this.setItem = jy,
						this.removeItem = jy, this.clear = jy)
				}
			}, {
				key: "_onCheckTimer",
				value: function() {
					if (this.checkTimes++, this.checkTimes % 20 == 0) {
						if (0 === this.storageQueue.size) return;
						this._doFlush()
					}
				}
			}, {
				key: "_doFlush",
				value: function() {
					try {
						var e, t = Kn(this.storageQueue);
						try {
							for (t.s(); !(e = t.n()).done;) {
								var n = Un(e.value, 2),
									r = n[0],
									o = n[1];
								this._setStorageSync(this._getKey(r), o)
							}
						} catch (i) {
							t.e(i)
						} finally {
							t.f()
						}
						this.storageQueue.clear()
					} catch (v_) {
						Ms.warn("Storage._doFlush error", v_)
					}
				}
			}, {
				key: "_getPrefix",
				value: function() {
					var e = this.tim.loginInfo,
						t = e.SDKAppID,
						n = e.identifier;
					return "TIM_".concat(t, "_").concat(n, "_")
				}
			}, {
				key: "getItem",
				value: function(e) {
					var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
					try {
						var n = t ? this._getKey(e) : e;
						return this._getStorageSync(n)
					} catch (v_) {
						return Ms.warn("Storage.getItem error:", v_), {}
					}
				}
			}, {
				key: "setItem",
				value: function(e, t) {
					var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
						r = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3];
					if (n) {
						var o = r ? this._getKey(e) : e;
						this._setStorageSync(o, t)
					} else this.storageQueue.set(e, t)
				}
			}, {
				key: "clear",
				value: function() {
					try {
						Fa ? Ba.clearStorageSync() : localStorage.clear()
					} catch (v_) {
						Ms.warn("Storage.clear error:", v_)
					}
				}
			}, {
				key: "removeItem",
				value: function(e) {
					var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
					try {
						var n = t ? this._getKey(e) : e;
						this._removeStorageSync(n)
					} catch (v_) {
						Ms.warn("Storage.removeItem error:", v_)
					}
				}
			}, {
				key: "getSize",
				value: function(e) {
					var t = this,
						n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] :
						"b";
					try {
						var r = {
							size: 0,
							limitSize: 5242880,
							unit: n
						};
						if (Object.defineProperty(r, "leftSize", {
								enumerable: !0,
								get: function() {
									return r.limitSize - r.size
								}
							}), Fa && (r.limitSize = 1024 * Ba.getStorageInfoSync().limitSize),
							e) r.size = JSON.stringify(this.getItem(e)).length + this._getKey(e)
							.length;
						else if (Fa) {
							var o = Ba.getStorageInfoSync(),
								i = o.keys;
							i.forEach((function(e) {
								r.size += JSON.stringify(t._getStorageSync(e))
									.length + t._getKey(e).length
							}))
						} else
							for (var a in localStorage) localStorage.hasOwnProperty(a) && (r
								.size += localStorage.getItem(a).length + a.length);
						return this._convertUnit(r)
					} catch (v_) {
						Ms.warn("Storage.getSize error:", v_)
					}
				}
			}, {
				key: "_convertUnit",
				value: function(e) {
					var t = {},
						n = e.unit;
					for (var r in t.unit = n, e) "number" == typeof e[r] && ("kb" === n
						.toLowerCase() ? t[r] = Math.round(e[r] / 1024) : "mb" === n
						.toLowerCase() ? t[r] = Math.round(e[r] / 1024 / 1024) : t[r] = e[r]
						);
					return t
				}
			}, {
				key: "_getKey",
				value: function(e) {
					return "".concat(this._getPrefix()).concat(e)
				}
			}, {
				key: "_setStorageSync",
				value: function(e, t) {
					Fa ? xa ? my.setStorageSync({
						key: e,
						data: t
					}) : Ba.setStorageSync(e, t) : localStorage.setItem(e, JSON.stringify(
						t))
				}
			}, {
				key: "_getStorageSync",
				value: function(e) {
					return Fa ? xa ? my.getStorageSync({
						key: e
					}).data : Ba.getStorageSync(e) : JSON.parse(localStorage.getItem(e))
				}
			}, {
				key: "_removeStorageSync",
				value: function(e) {
					Fa ? xa ? my.removeStorageSync({
						key: e
					}) : Ba.removeStorageSync(e) : localStorage.removeItem(e)
				}
			}, {
				key: "reset",
				value: function() {
					this._doFlush(), this.checkTimes = 0
				}
			}]), e
		}(),
		Hy = t((function(e) {
			var t = Object.prototype.hasOwnProperty,
				n = "~";

			function r() {}

			function o(e, t, n) {
				this.fn = e, this.context = t, this.once = n || !1
			}

			function i(e, t, r, i, a) {
				if ("function" != typeof r) throw new TypeError("The listener must be a function");
				var s = new o(r, i || e, a),
					u = n ? n + t : t;
				return e._events[u] ? e._events[u].fn ? e._events[u] = [e._events[u], s] : e._events[u]
					.push(s) : (e._events[u] = s, e._eventsCount++), e
			}

			function a(e, t) {
				0 == --e._eventsCount ? e._events = new r : delete e._events[t]
			}

			function s() {
				this._events = new r, this._eventsCount = 0
			}
			Object.create && (r.prototype = Object.create(null), (new r).__proto__ || (n = !1)), s
				.prototype.eventNames = function() {
					var e, r, o = [];
					if (0 === this._eventsCount) return o;
					for (r in e = this._events) t.call(e, r) && o.push(n ? r.slice(1) : r);
					return Object.getOwnPropertySymbols ? o.concat(Object.getOwnPropertySymbols(e)) : o
				}, s.prototype.listeners = function(e) {
					var t = n ? n + e : e,
						r = this._events[t];
					if (!r) return [];
					if (r.fn) return [r.fn];
					for (var o = 0, i = r.length, a = new Array(i); o < i; o++) a[o] = r[o].fn;
					return a
				}, s.prototype.listenerCount = function(e) {
					var t = n ? n + e : e,
						r = this._events[t];
					return r ? r.fn ? 1 : r.length : 0
				}, s.prototype.emit = function(e, t, r, o, i, a) {
					var s = n ? n + e : e;
					if (!this._events[s]) return !1;
					var u, c, l = this._events[s],
						p = arguments.length;
					if (l.fn) {
						switch (l.once && this.removeListener(e, l.fn, void 0, !0), p) {
							case 1:
								return l.fn.call(l.context), !0;
							case 2:
								return l.fn.call(l.context, t), !0;
							case 3:
								return l.fn.call(l.context, t, r), !0;
							case 4:
								return l.fn.call(l.context, t, r, o), !0;
							case 5:
								return l.fn.call(l.context, t, r, o, i), !0;
							case 6:
								return l.fn.call(l.context, t, r, o, i, a), !0
						}
						for (c = 1, u = new Array(p - 1); c < p; c++) u[c - 1] = arguments[c];
						l.fn.apply(l.context, u)
					} else {
						var f, h = l.length;
						for (c = 0; c < h; c++) switch (l[c].once && this.removeListener(e, l[c].fn,
							void 0, !0), p) {
							case 1:
								l[c].fn.call(l[c].context);
								break;
							case 2:
								l[c].fn.call(l[c].context, t);
								break;
							case 3:
								l[c].fn.call(l[c].context, t, r);
								break;
							case 4:
								l[c].fn.call(l[c].context, t, r, o);
								break;
							default:
								if (!u)
									for (f = 1, u = new Array(p - 1); f < p; f++) u[f - 1] =
										arguments[f];
								l[c].fn.apply(l[c].context, u)
						}
					}
					return !0
				}, s.prototype.on = function(e, t, n) {
					return i(this, e, t, n, !1)
				}, s.prototype.once = function(e, t, n) {
					return i(this, e, t, n, !0)
				}, s.prototype.removeListener = function(e, t, r, o) {
					var i = n ? n + e : e;
					if (!this._events[i]) return this;
					if (!t) return a(this, i), this;
					var s = this._events[i];
					if (s.fn) s.fn !== t || o && !s.once || r && s.context !== r || a(this, i);
					else {
						for (var u = 0, c = [], l = s.length; u < l; u++)(s[u].fn !== t || o && !s[u]
							.once || r && s[u].context !== r) && c.push(s[u]);
						c.length ? this._events[i] = 1 === c.length ? c[0] : c : a(this, i)
					}
					return this
				}, s.prototype.removeAllListeners = function(e) {
					var t;
					return e ? (t = n ? n + e : e, this._events[t] && a(this, t)) : (this._events =
						new r, this._eventsCount = 0), this
				}, s.prototype.off = s.prototype.removeListener, s.prototype.addListener = s.prototype
				.on, s.prefixed = n, s.EventEmitter = s, e.exports = s
		}));

	function $y(e) {
		var t = e.context || null;
		return {
			platform: Nh,
			websdkappid: Rh,
			v: Oh,
			a2: t && t.a2Key || void 0,
			tinyid: t && t.tinyID || void 0,
			sdkappid: t && t.SDKAppID || 0,
			contentType: t && t.contentType || 0,
			apn: t && t.apn || 1,
			accounttype: t && t.accountType || 0,
			sdkability: 2
		}
	}
	var zy = function() {
			function e(t) {
				In(this, e), this.tim = t, this.tim.innerEmitter.on(Fh, this._update, this), this.tim
					.innerEmitter.on(Vh, this._update, this), this.tim.innerEmitter.on(jh, this
						._updateSpecifiedConfig, this), this._initConfig()
			}
			return En(e, [{
				key: "_update",
				value: function(e) {
					this._initConfig()
				}
			}, {
				key: "_updateSpecifiedConfig",
				value: function(e) {
					var t = this;
					e.data.forEach((function(e) {
						t._set(e)
					}))
				}
			}, {
				key: "get",
				value: function(e) {
					var t = e.name,
						n = e.action,
						r = e.param,
						o = e.tjgID;
					if (ks(this.config[t]) || ks(this.config[t][n])) throw new Vp({
						code: Bp.NETWORK_PACKAGE_UNDEFINED,
						message: "".concat(Wf, ": PackageConfig.").concat(t)
					});
					var i = function e(t) {
						if (0 === Object.getOwnPropertyNames(t).length) return Object
							.create(null);
						var n = Array.isArray(t) ? [] : Object.create(null),
							r = "";
						for (var o in t) null !== t[o] ? void 0 !== t[o] ? (r = Mn(t[o]), [
								"string", "number", "function", "boolean"
							].indexOf(r) >= 0 ? n[o] = t[o] : n[o] = e(t[o])) : n[o] =
							void 0 : n[o] = null;
						return n
					}(this.config[t][n]);
					return i.requestData = this._initRequestData(r, i), i.encode = this
						._initEncoder(i), i.decode = this._initDecoder(i), o && (i.queryString
							.tjg_id = o), i
				}
			}, {
				key: "_set",
				value: function(e) {
					var t = e.key,
						n = e.value;
					if (!1 != !!t) {
						var r = t.split(".");
						if (!(r.length <= 0)) {
							! function e(t, n, r, o) {
								var i = n[r];
								"object" === Mn(t[i]) ? e(t[i], n, r + 1, o) : t[i] = o
							}(this.config, r, 0, n)
						}
					}
				}
			}, {
				key: "_initConfig",
				value: function() {
					var e;
					this.config = {}, this.config.accessLayer = (e = this.tim, {
						create: null,
						query: {
							serverName: qh.NAME.WEB_IM,
							cmd: qh.CMD.ACCESS_LAYER,
							channel: qh.CHANNEL.XHR,
							protocol: wh,
							method: "POST",
							queryString: Dn(Dn({}, $y(e)), {}, {
								identifier: e.context.identifier,
								usersig: e.context.userSig
							}),
							requestData: {}
						},
						update: null,
						delete: null
					}), this.config.login = function(e) {
						return {
							create: null,
							query: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.LOGIN,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: Dn(Dn({}, $y(e)), {}, {
									identifier: e.loginInfo.identifier,
									usersig: e.loginInfo.userSig,
									sdkappid: e.loginInfo.SDKAppID,
									accounttype: e.loginInfo.accountType,
									reqtime: +new Date / 1e3
								}),
								requestData: {
									state: "Online"
								},
								keyMaps: {
									request: {
										tinyID: "tinyId"
									},
									response: {
										TinyId: "tinyID"
									}
								}
							},
							update: null,
							delete: null
						}
					}(this.tim), this.config.logout = function(e) {
						return {
							create: null,
							query: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.LOGOUT_ALL,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: Dn(Dn({}, $y(e)), {}, {
									reqtime: +new Date / 1e3
								}),
								requestData: {}
							},
							update: null,
							delete: null
						}
					}(this.tim), this.config.longPollLogout = function(e) {
						return {
							create: null,
							query: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.LOGOUT_LONG_POLL,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: Dn(Dn({}, $y(e)), {}, {
									reqtime: +new Date
								}),
								requestData: {
									longPollID: ""
								},
								keyMaps: {
									request: {
										longPollID: "LongPollingId"
									}
								}
							},
							update: null,
							delete: null
						}
					}(this.tim), this.config.profile = function(e) {
						var t = $y(e),
							n = {
								serverName: qh.NAME.PROFILE,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t
							};
						return {
							query: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.PORTRAIT_GET,
								requestData: {
									fromAccount: "",
									userItem: []
								},
								keyMaps: {
									request: {
										toAccount: "To_Account",
										standardSequence: "StandardSequence",
										customSequence: "CustomSequence"
									}
								}
							}),
							update: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.PORTRAIT_SET,
								requestData: {
									fromAccount: "",
									profileItem: [{
										tag: Mp.NICK,
										value: ""
									}, {
										tag: Mp.GENDER,
										value: ""
									}, {
										tag: Mp.ALLOWTYPE,
										value: ""
									}, {
										tag: Mp.AVATAR,
										value: ""
									}]
								}
							})
						}
					}(this.tim), this.config.group = function(e) {
						var t = qh.NAME.GROUP,
							n = $y(e);
						if (e.context.login !== Xu.IS_LOGIN || !e.context.a2Key) {
							t = qh.NAME.BIG_GROUP_NO_AUTH;
							var r = $y(e);
							r.a2, r.tinyid;
							n = wn(r, ["a2", "tinyid"])
						}
						var o = {
								request: {
									ownerID: "Owner_Account",
									userID: "Member_Account",
									newOwnerID: "NewOwner_Account",
									maxMemberNum: "MaxMemberCount",
									groupCustomField: "AppDefinedData",
									memberCustomField: "AppMemberDefinedData",
									groupCustomFieldFilter: "AppDefinedDataFilter_Group",
									memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember",
									messageRemindType: "MsgFlag",
									userIDList: "MemberList",
									groupIDList: "GroupIdList",
									applyMessage: "ApplyMsg",
									muteTime: "ShutUpTime",
									muteAllMembers: "ShutUpAllMember",
									joinOption: "ApplyJoinOption",
									avatar: "FaceUrl"
								},
								response: {
									GroupIdList: "groups",
									MsgFlag: "messageRemindType",
									AppDefinedData: "groupCustomField",
									AppMemberDefinedData: "memberCustomField",
									AppDefinedDataFilter_Group: "groupCustomFieldFilter",
									AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter",
									InfoSeq: "infoSequence",
									MemberList: "members",
									GroupInfo: "groups",
									ShutUpUntil: "muteUntil",
									ShutUpAllMember: "muteAllMembers",
									ApplyJoinOption: "joinOption"
								}
							},
							i = {
								serverName: qh.NAME.GROUP,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								queryString: n
							};
						return {
							create: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.CREATE_GROUP,
								requestData: {
									type: _n.GRP_WORK,
									name: void 0,
									groupID: void 0,
									ownerID: e.loginInfo.identifier,
									introduction: void 0,
									notification: void 0,
									avatar: void 0,
									maxMemberNum: void 0,
									joinOption: void 0,
									memberList: void 0,
									groupCustomField: void 0
								},
								keyMaps: o
							}),
							list: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.GET_JOINED_GROUPS,
								requestData: {
									userID: e.loginInfo.identifier,
									limit: void 0,
									offset: void 0,
									groupType: void 0,
									responseFilter: void 0
								},
								keyMaps: o
							}),
							query: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.GET_GROUP_INFO,
								requestData: {
									groupIDList: void 0,
									responseFilter: void 0
								},
								keyMaps: o
							}),
							getGroupMemberProfile: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.GET_GROUP_MEMBER_INFO,
								requestData: {
									groupID: void 0,
									userIDList: void 0,
									memberInfoFilter: void 0,
									memberCustomFieldFilter: void 0
								},
								keyMaps: {
									request: Dn(Dn({}, o.request), {}, {
										userIDList: "Member_List_Account"
									}),
									response: o.response
								}
							}),
							getGroupMemberList: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.GET_GROUP_MEMBER_LIST,
								requestData: {
									groupID: void 0,
									limit: 0,
									offset: 0,
									memberRoleFilter: void 0,
									memberInfoFilter: void 0
								},
								keyMaps: o
							}),
							quitGroup: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.QUIT_GROUP,
								requestData: {
									groupID: void 0
								}
							}),
							changeGroupOwner: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.CHANGE_GROUP_OWNER,
								queryString: n,
								requestData: {
									groupID: void 0,
									newOwnerID: void 0
								},
								keyMaps: o
							}),
							destroyGroup: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.DESTROY_GROUP,
								requestData: {
									groupID: void 0
								}
							}),
							updateGroupProfile: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.MODIFY_GROUP_INFO,
								requestData: {
									groupID: void 0,
									name: void 0,
									introduction: void 0,
									notification: void 0,
									avatar: void 0,
									maxMemberNum: void 0,
									joinOption: void 0,
									groupCustomField: void 0,
									muteAllMembers: void 0
								},
								keyMaps: {
									request: Dn(Dn({}, o.request), {}, {
										groupCustomField: "AppDefinedData"
									}),
									response: o.response
								}
							}),
							modifyGroupMemberInfo: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.MODIFY_GROUP_MEMBER_INFO,
								requestData: {
									groupID: void 0,
									userID: void 0,
									messageRemindType: void 0,
									nameCard: void 0,
									role: void 0,
									memberCustomField: void 0,
									muteTime: void 0
								},
								keyMaps: o
							}),
							addGroupMember: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.ADD_GROUP_MEMBER,
								requestData: {
									groupID: void 0,
									silence: void 0,
									userIDList: void 0
								},
								keyMaps: o
							}),
							deleteGroupMember: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.DELETE_GROUP_MEMBER,
								requestData: {
									groupID: void 0,
									userIDList: void 0,
									reason: void 0
								},
								keyMaps: {
									request: {
										userIDList: "MemberToDel_Account"
									}
								}
							}),
							searchGroupByID: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.SEARCH_GROUP_BY_ID,
								requestData: {
									groupIDList: void 0,
									responseFilter: {
										groupBasePublicInfoFilter: ["Type", "Name",
											"Introduction", "Notification",
											"FaceUrl", "CreateTime",
											"Owner_Account", "LastInfoTime",
											"LastMsgTime", "NextMsgSeq",
											"MemberNum", "MaxMemberNum",
											"ApplyJoinOption"
										]
									}
								},
								keyMaps: {
									request: {
										groupIDList: "GroupIdList"
									}
								}
							}),
							applyJoinGroup: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.APPLY_JOIN_GROUP,
								requestData: {
									groupID: void 0,
									applyMessage: void 0,
									userDefinedField: void 0
								},
								keyMaps: o
							}),
							applyJoinAVChatRoom: Dn(Dn({}, i), {}, {
								serverName: qh.NAME.BIG_GROUP_NO_AUTH,
								cmd: qh.CMD.APPLY_JOIN_GROUP,
								requestData: {
									groupID: void 0,
									applyMessage: void 0,
									userDefinedField: void 0
								},
								keyMaps: o
							}),
							handleApplyJoinGroup: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.HANDLE_APPLY_JOIN_GROUP,
								requestData: {
									groupID: void 0,
									applicant: void 0,
									handleAction: void 0,
									handleMessage: void 0,
									authentication: void 0,
									messageKey: void 0,
									userDefinedField: void 0
								},
								keyMaps: {
									request: {
										applicant: "Applicant_Account",
										handleAction: "HandleMsg",
										handleMessage: "ApprovalMsg",
										messageKey: "MsgKey"
									},
									response: {
										MsgKey: "messageKey"
									}
								}
							}),
							deleteGroupSystemNotice: Dn(Dn({}, i), {}, {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.DELETE_GROUP_SYSTEM_MESSAGE,
								requestData: {
									messageListToDelete: void 0
								},
								keyMaps: {
									request: {
										messageListToDelete: "DelMsgList",
										messageSeq: "MsgSeq",
										messageRandom: "MsgRandom"
									}
								}
							}),
							getGroupPendency: Dn(Dn({}, i), {}, {
								cmd: qh.CMD.GET_GROUP_PENDENCY,
								requestData: {
									startTime: void 0,
									limit: void 0,
									handleAccount: void 0
								},
								keyMaps: {
									request: {
										handleAccount: "Handle_Account"
									}
								}
							}),
							getOnlineMemberNum: {
								serverName: t,
								cmd: qh.CMD.GET_ONLINE_MEMBER_NUM,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								queryString: n,
								requestData: {
									groupID: void 0
								}
							}
						}
					}(this.tim), this.config.longPollID = function(e) {
						return {
							create: {},
							query: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.GET_LONG_POLL_ID,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								queryString: Dn(Dn({}, $y(e)), {}, {
									instanceid: e.context.instanceID,
									reqtime: +new Date / 1e3
								}),
								requestData: {},
								keyMaps: {
									response: {
										LongPollingId: "longPollingID"
									}
								}
							},
							update: {},
							delete: {}
						}
					}(this.tim), this.config.longPoll = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
							instanceid: e.context.instanceID,
							reqtime: Math.ceil(+new Date / 1e3)
						});
						return {
							create: {},
							query: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.LONG_POLL,
								channel: qh.CHANNEL.AUTO,
								protocol: wh,
								queryString: t,
								requestData: {
									timeout: null,
									cookie: {
										notifySeq: 0,
										noticeSeq: 0,
										longPollingID: 0
									}
								},
								keyMaps: {
									response: {
										C2cMsgArray: "C2CMessageArray",
										GroupMsgArray: "groupMessageArray",
										GroupTips: "groupTips",
										C2cNotifyMsgArray: "C2CNotifyMessageArray",
										ClientSeq: "clientSequence",
										MsgPriority: "priority",
										NoticeSeq: "noticeSequence",
										MsgContent: "content",
										MsgType: "type",
										MsgBody: "elements",
										ToGroupId: "to",
										Desc: "description",
										Ext: "extension"
									}
								}
							},
							update: {},
							delete: {}
						}
					}(this.tim), this.config.applyC2C = function(e) {
						var t = $y(e),
							n = {
								serverName: qh.NAME.FRIEND,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								queryString: t
							};
						return {
							create: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.FRIEND_ADD,
								requestData: {
									fromAccount: "",
									addFriendItem: []
								}
							}),
							get: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.GET_PENDENCY,
								requestData: {
									fromAccount: "",
									pendencyType: "Pendency_Type_ComeIn"
								}
							}),
							update: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.RESPONSE_PENDENCY,
								requestData: {
									fromAccount: "",
									responseFriendItem: []
								}
							}),
							delete: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.DELETE_PENDENCY,
								requestData: {
									fromAccount: "",
									toAccount: [],
									pendencyType: "Pendency_Type_ComeIn"
								}
							})
						}
					}(this.tim), this.config.friend = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
								reqtime: function() {
									return +new Date
								}
							}),
							n = {
								serverName: qh.NAME.FRIEND,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t
							};
						return {
							get: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.FRIEND_GET_ALL,
								requestData: {
									fromAccount: "",
									timeStamp: 0,
									tagList: [Mp.NICK, "Tag_SNS_IM_Remark", Mp
										.AVATAR
									]
								},
								keyMaps: {
									request: {},
									response: {}
								}
							}),
							delete: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.FRIEND_DELETE,
								requestData: {
									fromAccount: "",
									toAccount: [],
									deleteType: "Delete_Type_Single"
								}
							})
						}
					}(this.tim), this.config.blacklist = function(e) {
						var t = $y(e),
							n = {
								serverName: qh.NAME.FRIEND,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t
							};
						return {
							create: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.ADD_BLACKLIST,
								requestData: {
									fromAccount: "",
									toAccount: []
								}
							}),
							get: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.GET_BLACKLIST,
								requestData: {
									fromAccount: "",
									startIndex: 0,
									maxLimited: 30,
									lastSequence: 0
								}
							}),
							delete: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.DELETE_BLACKLIST,
								requestData: {
									fromAccount: "",
									toAccount: []
								}
							}),
							update: {}
						}
					}(this.tim), this.config.c2cMessage = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
								reqtime: function() {
									return +new Date
								}
							}),
							n = {
								request: {
									fromAccount: "From_Account",
									toAccount: "To_Account",
									msgTimeStamp: "MsgTimeStamp",
									msgSeq: "MsgSeq",
									msgRandom: "MsgRandom",
									msgBody: "MsgBody",
									count: "MaxCnt",
									lastMessageTime: "LastMsgTime",
									messageKey: "MsgKey",
									peerAccount: "Peer_Account",
									data: "Data",
									description: "Desc",
									extension: "Ext",
									type: "MsgType",
									content: "MsgContent",
									sizeType: "Type",
									uuid: "UUID",
									url: "",
									imageUrl: "URL",
									fileUrl: "Url",
									remoteAudioUrl: "Url",
									remoteVideoUrl: "VideoUrl",
									thumbUUID: "ThumbUUID",
									videoUUID: "VideoUUID",
									videoUrl: "",
									downloadFlag: "Download_Flag",
									nick: "From_AccountNick",
									avatar: "From_AccountHeadurl",
									from: "From_Account",
									time: "MsgTimeStamp",
									messageRandom: "MsgRandom",
									messageSequence: "MsgSeq",
									elements: "MsgBody",
									clientSequence: "ClientSeq",
									payload: "MsgContent",
									messageList: "MsgList",
									messageNumber: "MsgNum",
									abstractList: "AbstractList",
									messageBody: "MsgBody"
								},
								response: {
									MsgContent: "content",
									MsgTime: "time",
									Data: "data",
									Desc: "description",
									Ext: "extension",
									MsgKey: "messageKey",
									MsgType: "type",
									MsgBody: "elements",
									Download_Flag: "downloadFlag",
									ThumbUUID: "thumbUUID",
									VideoUUID: "videoUUID"
								}
							},
							r = {
								serverName: qh.NAME.OPEN_IM,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t
							};
						return {
							create: Dn(Dn({}, r), {}, {
								cmd: qh.CMD.SEND_MESSAGE,
								requestData: {
									fromAccount: e.loginInfo.identifier,
									toAccount: "",
									msgTimeStamp: Math.ceil(+new Date / 1e3),
									msgSeq: 0,
									msgRandom: 0,
									msgBody: [],
									nick: "",
									avatar: "",
									msgLifeTime: void 0,
									offlinePushInfo: {
										pushFlag: 0,
										title: "",
										desc: "",
										ext: "",
										apnsInfo: {
											badgeMode: 0
										},
										androidInfo: {
											OPPOChannelID: ""
										}
									}
								},
								keyMaps: n
							}),
							query: Dn(Dn({}, r), {}, {
								cmd: qh.CMD.GET_C2C_ROAM_MESSAGES,
								requestData: {
									peerAccount: "",
									count: 15,
									lastMessageTime: 0,
									messageKey: "",
									withRecalledMsg: 1
								},
								keyMaps: n
							})
						}
					}(this.tim), this.config.c2cMessageWillBeRevoked = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
							reqtime: function() {
								return +new Date
							}
						});
						return {
							create: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.REVOKE_C2C_MESSAGE,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t,
								requestData: {
									msgInfo: {
										fromAccount: "",
										toAccount: "",
										msgTimeStamp: Math.ceil(+new Date / 1e3),
										msgSeq: 0,
										msgRandom: 0
									}
								},
								keyMaps: {
									request: {
										msgInfo: "MsgInfo",
										fromAccount: "From_Account",
										toAccount: "To_Account",
										msgTimeStamp: "MsgTimeStamp",
										msgSeq: "MsgSeq",
										msgRandom: "MsgRandom",
										msgBody: "MsgBody"
									}
								}
							}
						}
					}(this.tim), this.config.c2cPeerReadTime = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
							reqtime: function() {
								return +new Date
							}
						});
						return {
							get: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.GET_PEER_READ_TIME,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t,
								requestData: {
									userIDList: void 0
								},
								keyMaps: {
									request: {
										userIDList: "To_Account"
									},
									response: {
										ReadTime: "peerReadTimeList"
									}
								}
							}
						}
					}(this.tim), this.config.groupMessage = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
								reqtime: function() {
									return +new Date
								}
							}),
							n = {
								request: {
									to: "GroupId",
									extension: "Ext",
									data: "Data",
									description: "Desc",
									random: "Random",
									sequence: "ReqMsgSeq",
									count: "ReqMsgNumber",
									type: "MsgType",
									priority: "MsgPriority",
									content: "MsgContent",
									elements: "MsgBody",
									sizeType: "Type",
									uuid: "UUID",
									url: "",
									imageUrl: "URL",
									fileUrl: "Url",
									remoteAudioUrl: "Url",
									remoteVideoUrl: "VideoUrl",
									thumbUUID: "ThumbUUID",
									videoUUID: "VideoUUID",
									videoUrl: "",
									downloadFlag: "Download_Flag",
									clientSequence: "ClientSeq",
									from: "From_Account",
									time: "MsgTimeStamp",
									messageRandom: "MsgRandom",
									messageSequence: "MsgSeq",
									payload: "MsgContent",
									messageList: "MsgList",
									messageNumber: "MsgNum",
									abstractList: "AbstractList",
									messageBody: "MsgBody"
								},
								response: {
									Random: "random",
									MsgTime: "time",
									MsgSeq: "sequence",
									ReqMsgSeq: "sequence",
									RspMsgList: "messageList",
									IsPlaceMsg: "isPlaceMessage",
									IsSystemMsg: "isSystemMessage",
									ToGroupId: "to",
									EnumFrom_AccountType: "fromAccountType",
									EnumTo_AccountType: "toAccountType",
									GroupCode: "groupCode",
									MsgPriority: "priority",
									MsgBody: "elements",
									MsgType: "type",
									MsgContent: "content",
									IsFinished: "complete",
									Download_Flag: "downloadFlag",
									ClientSeq: "clientSequence",
									ThumbUUID: "thumbUUID",
									VideoUUID: "videoUUID"
								}
							},
							r = {
								serverName: qh.NAME.GROUP,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t
							};
						return {
							create: Dn(Dn({}, r), {}, {
								cmd: qh.CMD.SEND_GROUP_MESSAGE,
								requestData: {
									groupID: "",
									fromAccount: e.loginInfo.identifier,
									random: 0,
									clientSequence: 0,
									priority: "",
									msgBody: [],
									onlineOnlyFlag: 0,
									offlinePushInfo: {
										pushFlag: 0,
										title: "",
										desc: "",
										ext: "",
										apnsInfo: {
											badgeMode: 0
										},
										androidInfo: {
											OPPOChannelID: ""
										}
									},
									groupAtInfo: []
								},
								keyMaps: n
							}),
							query: Dn(Dn({}, r), {}, {
								cmd: qh.CMD.GET_GROUP_ROAM_MESSAGES,
								requestData: {
									withRecalledMsg: 1,
									groupID: "",
									count: 15,
									sequence: ""
								},
								keyMaps: n
							}),
							update: null,
							delete: null
						}
					}(this.tim), this.config.groupMessageWillBeRevoked = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
							reqtime: function() {
								return +new Date
							}
						});
						return {
							create: {
								serverName: qh.NAME.GROUP,
								cmd: qh.CMD.REVOKE_GROUP_MESSAGE,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t,
								requestData: {
									to: "",
									msgSeqList: []
								},
								keyMaps: {
									request: {
										to: "GroupId",
										msgSeqList: "MsgSeqList",
										msgSeq: "MsgSeq"
									}
								}
							}
						}
					}(this.tim), this.config.conversation = function(e) {
						var t = $y(e),
							n = {
								serverName: qh.NAME.RECENT_CONTACT,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t
							};
						return {
							query: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.GET_CONVERSATION_LIST,
								requestData: {
									fromAccount: e.loginInfo.identifier,
									count: 0
								},
								keyMaps: {
									request: {},
									response: {
										SessionItem: "conversations",
										ToAccount: "groupID",
										To_Account: "userID",
										UnreadMsgCount: "unreadCount",
										MsgGroupReadedSeq: "messageReadSeq"
									}
								}
							}),
							pagingQuery: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.PAGING_GET_CONVERSATION_LIST,
								requestData: {
									fromAccount: void 0,
									timeStamp: void 0,
									orderType: void 0
								},
								keyMaps: {
									request: {},
									response: {
										SessionItem: "conversations",
										ToAccount: "groupID",
										To_Account: "userID",
										UnreadMsgCount: "unreadCount",
										MsgGroupReadedSeq: "messageReadSeq",
										C2cPeerReadTime: "c2cPeerReadTime"
									}
								}
							}),
							delete: Dn(Dn({}, n), {}, {
								cmd: qh.CMD.DELETE_CONVERSATION,
								requestData: {
									fromAccount: e.loginInfo.identifier,
									toAccount: void 0,
									type: 1,
									toGroupID: void 0
								},
								keyMaps: {
									request: {
										toGroupID: "ToGroupid"
									}
								}
							}),
							setC2CMessageRead: Dn(Dn({}, n), {}, {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.SET_C2C_MESSAGE_READ,
								requestData: {
									C2CMsgReaded: void 0
								},
								keyMaps: {
									request: {
										lastMessageTime: "LastedMsgTime"
									}
								}
							}),
							setGroupMessageRead: Dn(Dn({}, n), {}, {
								serverName: qh.NAME.GROUP,
								cmd: qh.CMD.SET_GROUP_MESSAGE_READ,
								requestData: {
									groupID: void 0,
									messageReadSeq: void 0
								},
								keyMaps: {
									request: {
										messageReadSeq: "MsgReadedSeq"
									}
								}
							}),
							deleteGroupAtTips: Dn(Dn({}, n), {}, {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.DELETE_GROUP_AT_TIPS,
								requestData: {
									messageListToDelete: void 0
								},
								keyMaps: {
									request: {
										messageListToDelete: "DelMsgList",
										messageSeq: "MsgSeq",
										messageRandom: "MsgRandom"
									}
								}
							})
						}
					}(this.tim), this.config.syncMessage = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
							reqtime: function() {
								return [Math.ceil(+new Date), Math.random()]
									.join("")
							}
						});
						return {
							create: null,
							query: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.GET_MESSAGES,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t,
								requestData: {
									cookie: "",
									syncFlag: 0,
									needAbstract: 1
								},
								keyMaps: {
									request: {
										fromAccount: "From_Account",
										toAccount: "To_Account",
										from: "From_Account",
										to: "To_Account",
										time: "MsgTimeStamp",
										sequence: "MsgSeq",
										random: "MsgRandom",
										elements: "MsgBody"
									},
									response: {
										MsgList: "messageList",
										SyncFlag: "syncFlag",
										To_Account: "to",
										From_Account: "from",
										ClientSeq: "clientSequence",
										MsgSeq: "sequence",
										NoticeSeq: "noticeSequence",
										NotifySeq: "notifySequence",
										MsgRandom: "random",
										MsgTimeStamp: "time",
										MsgContent: "content",
										ToGroupId: "groupID",
										MsgKey: "messageKey",
										GroupTips: "groupTips",
										MsgBody: "elements",
										MsgType: "type",
										C2CRemainingUnreadCount: "C2CRemainingUnreadList"
									}
								}
							},
							update: null,
							delete: null
						}
					}(this.tim), this.config.AVChatRoom = function(e) {
						var t = qh.NAME.BIG_GROUP_LONG_POLLING,
							n = Dn(Dn({}, $y(e)), {}, {
								accounttype: "792",
								reqtime: function() {
									return +new Date
								}
							});
						if (e.context.login !== Xu.IS_LOGIN || !e.context.a2Key) {
							t = qh.NAME.BIG_GROUP_LONG_POLLING_NO_AUTH;
							var r = n;
							r.a2, r.tinyid;
							n = wn(r, ["a2", "tinyid"])
						}
						return {
							startLongPoll: {
								serverName: t,
								cmd: qh.CMD.AVCHATROOM_LONG_POLL,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: n,
								requestData: {
									USP: 1,
									startSeq: 1,
									holdTime: 90,
									key: void 0
								},
								keyMaps: {
									request: {
										USP: "USP"
									},
									response: {
										ToGroupId: "groupID",
										MsgPriority: "priority"
									}
								}
							}
						}
					}(this.tim), this.config.cosUpload = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
							reqtime: function() {
								return +new Date
							}
						});
						return {
							create: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.FILE_UPLOAD,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t,
								requestData: {
									appVersion: "2.1",
									fromAccount: "",
									toAccount: "",
									sequence: 0,
									time: function() {
										return Math.ceil(Date.now() / 1e3)
									},
									random: function() {
										return xs()
									},
									fileStrMd5: "",
									fileSize: "",
									serverVer: 1,
									authKey: "",
									busiId: 1,
									pkgFlag: 1,
									sliceOffset: 0,
									sliceSize: 0,
									sliceData: "",
									contentType: "application/x-www-form-urlencoded"
								},
								keyMaps: {
									request: {},
									response: {}
								}
							},
							update: null,
							delete: null
						}
					}(this.tim), this.config.cosSig = function(e) {
						var t = {
							sdkappid: e.loginInfo.SDKAppID,
							identifier: e.loginInfo.identifier,
							userSig: e.context.userSig
						};
						return {
							create: null,
							query: {
								serverName: qh.NAME.IM_COS_SIGN,
								cmd: qh.CMD.COS_SIGN,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t,
								requestData: {
									cmd: "open_im_cos_svc",
									subCmd: "get_cos_token",
									duration: 300,
									version: 2
								},
								keyMaps: {
									request: {
										userSig: "usersig",
										subCmd: "sub_cmd",
										cmd: "cmd",
										duration: "duration",
										version: "version"
									},
									response: {
										expired_time: "expiredTime",
										bucket_name: "bucketName",
										session_token: "sessionToken",
										tmp_secret_id: "secretId",
										tmp_secret_key: "secretKey"
									}
								}
							},
							update: null,
							delete: null
						}
					}(this.tim), this.config.cosPreSig = function(e) {
						var t = {
							sdkappid: e.loginInfo.SDKAppID,
							identifier: e.loginInfo.identifier,
							userSig: e.context.userSig,
							platform: Fa ? 8 : 7,
							version: Oh
						};
						return {
							query: {
								serverName: qh.NAME.IM_COS_MESSAGE,
								cmd: qh.CMD.COS_PRE_SIG,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t,
								requestData: {
									fileType: void 0,
									fileName: void 0,
									uploadMethod: 0,
									duration: 900
								},
								keyMaps: {
									request: {
										userSig: "usersig",
										fileType: "file_type",
										fileName: "file_name",
										uploadMethod: "upload_method"
									},
									response: {
										expired_time: "expiredTime",
										request_id: "requestId",
										head_url: "headUrl",
										upload_url: "uploadUrl",
										download_url: "downloadUrl",
										ci_url: "ciUrl"
									}
								}
							}
						}
					}(this.tim), this.config.bigDataHallwayAuthKey = function(e) {
						return {
							create: null,
							query: {
								serverName: qh.NAME.OPEN_IM,
								cmd: qh.CMD.BIG_DATA_HALLWAY_AUTH_KEY,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: Dn(Dn({}, $y(e)), {}, {
									accounttype: "792",
									reqtime: function() {
										return +new Date
									}
								}),
								requestData: {}
							}
						}
					}(this.tim), this.config.ssoEventStat = function(e) {
						var t = {
							sdkappid: e.loginInfo.SDKAppID,
							reqtime: Math.ceil(+new Date / 1e3)
						};
						return {
							create: {
								serverName: qh.NAME.IM_OPEN_STAT,
								cmd: qh.CMD.TIM_WEB_REPORT,
								channel: qh.CHANNEL.AUTO,
								protocol: wh,
								queryString: t,
								requestData: {
									table: "",
									report: []
								},
								keyMaps: {
									request: {
										table: "table",
										report: "report",
										SDKAppID: "sdkappid",
										version: "version",
										tinyID: "tinyid",
										userID: "userid",
										platform: "platform",
										method: "method",
										time: "time",
										start: "start",
										end: "end",
										cost: "cost",
										status: "status",
										codeint: "codeint",
										message: "message",
										pointer: "pointer",
										text: "text",
										msgType: "msgtype",
										networkType: "networktype",
										startts: "startts",
										endts: "endts",
										timespan: "timespan"
									}
								}
							},
							query: {},
							update: {},
							delete: {}
						}
					}(this.tim), this.config.ssoSumStat = function(e) {
						var t = null;
						null !== e.context && (t = {
							sdkappid: e.context.SDKAppID,
							reqtime: Math.ceil(+new Date / 1e3)
						});
						return {
							create: {
								serverName: qh.NAME.IM_OPEN_STAT,
								cmd: qh.CMD.TIM_WEB_REPORT,
								channel: qh.CHANNEL.AUTO,
								protocol: wh,
								queryString: t,
								requestData: {
									table: "",
									report: []
								},
								keyMaps: {
									request: {
										table: "table",
										report: "report",
										SDKAppID: "sdkappid",
										version: "version",
										tinyID: "tinyid",
										userID: "userid",
										item: "item",
										lpID: "lpid",
										platform: "platform",
										scene: "scene",
										networkType: "networktype",
										total: "total",
										successRate: "successrate",
										avg: "avg",
										timespan: "timespan",
										time: "time"
									}
								}
							},
							query: {},
							update: {},
							delete: {}
						}
					}(this.tim), this.config.mergerMessage = function(e) {
						var t = Dn(Dn({}, $y(e)), {}, {
								reqtime: function() {
									return +new Date
								}
							}),
							n = {
								request: {
									fromAccount: "From_Account",
									toAccount: "To_Account",
									msgTimeStamp: "MsgTimeStamp",
									msgSeq: "MsgSeq",
									msgRandom: "MsgRandom",
									msgBody: "MsgBody",
									type: "MsgType",
									content: "MsgContent",
									data: "Data",
									description: "Desc",
									extension: "Ext",
									sizeType: "Type",
									uuid: "UUID",
									url: "",
									imageUrl: "URL",
									fileUrl: "Url",
									remoteAudioUrl: "Url",
									remoteVideoUrl: "VideoUrl",
									thumbUUID: "ThumbUUID",
									videoUUID: "VideoUUID",
									videoUrl: "",
									downloadFlag: "Download_Flag",
									from: "From_Account",
									time: "MsgTimeStamp",
									messageRandom: "MsgRandom",
									messageSequence: "MsgSeq",
									elements: "MsgBody",
									clientSequence: "ClientSeq",
									payload: "MsgContent",
									messageList: "MsgList",
									messageNumber: "MsgNum",
									abstractList: "AbstractList",
									messageBody: "MsgBody"
								},
								response: {
									Data: "data",
									Desc: "description",
									Ext: "extension",
									Download_Flag: "downloadFlag",
									ThumbUUID: "thumbUUID",
									VideoUUID: "videoUUID"
								}
							},
							r = {
								serverName: qh.NAME.IM_LONG_MESSAGE,
								channel: qh.CHANNEL.XHR,
								protocol: wh,
								method: "POST",
								queryString: t
							};
						return {
							create: Dn(Dn({}, r), {}, {
								cmd: qh.CMD.UPLOAD_MERGER_MESSAGE,
								requestData: {
									messageList: [],
									messageNumber: 0,
									abstractList: "",
									title: "",
									compatibleText: ""
								},
								keyMaps: n
							}),
							query: Dn(Dn({}, r), {}, {
								cmd: qh.CMD.DOWNLOAD_MERGER_MESSAGE,
								requestData: {
									downloadKey: ""
								},
								keyMaps: n
							})
						}
					}(this.tim)
				}
			}, {
				key: "_initRequestData",
				value: function(e, t) {
					if (void 0 === e) return Ud(t.requestData, this._getRequestMap(t), this
					.tim);
					var n = t.requestData,
						r = Object.create(null);
					for (var o in n)
						if (Object.prototype.hasOwnProperty.call(n, o)) {
							if (r[o] = "function" == typeof n[o] ? n[o]() : n[o], void 0 === e[
									o]) continue;
							r[o] = e[o]
						} return r = Ud(r, this._getRequestMap(t), this.tim)
				}
			}, {
				key: "_getRequestMap",
				value: function(e) {
					if (e.keyMaps && e.keyMaps.request && Object.keys(e.keyMaps.request)
						.length > 0) return e.keyMaps.request
				}
			}, {
				key: "_initEncoder",
				value: function(e) {
					switch (e.protocol) {
						case wh:
							return function(e) {
								if ("string" === Mn(e)) try {
									return JSON.parse(e)
								} catch (v_) {
									return e
								}
								return e
							};
						case Lh:
							return function(e) {
								return e
							};
						default:
							return function(e) {
								return Ms.warn(
									"PackageConfig._initEncoder(), unknow response type, data: ",
									JSON.stringify(e)), e
							}
					}
				}
			}, {
				key: "_initDecoder",
				value: function(e) {
					switch (e.protocol) {
						case wh:
							return function(e) {
								if ("string" === Mn(e)) try {
									return JSON.parse(e)
								} catch (v_) {
									return e
								}
								return e
							};
						case Lh:
							return function(e) {
								return e
							};
						default:
							return function(e) {
								return Ms.warn(
									"PackageConfig._initDecoder(), unknow response type, data: ",
									e), e
							}
					}
				}
			}]), e
		}(),
		Wy = Math.floor;
	Re({
		target: "Number",
		stat: !0
	}, {
		isInteger: function(e) {
			return !m(e) && isFinite(e) && Wy(e) === e
		}
	});
	var Yy = function() {
			for (var e = [], t = Jy(arguments), n = 0; n < arguments.length; n++) Number.isInteger(arguments[
				n]) ? e.push(arguments[n]) : e.push(!0 == !!arguments[n] ? "1" : "0");
			return e.join(t)
		},
		Jy = function(e) {
			var t = e.length,
				n = e[t - 1];
			if ("string" != typeof n) return "";
			if (n.length > 1) return "";
			var r = e[t - 1];
			return delete e[t - 1], e.length -= t === e.length ? 1 : 0, r
		},
		Xy = {
			C2CMessageArray: 1,
			groupMessageArray: 1,
			groupTips: 1,
			C2CNotifyMessageArray: 1,
			profileModify: 1,
			friendListMod: 1
		},
		Qy = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e))._initialization(), r
			}
			return En(n, [{
				key: "_initialization",
				value: function() {
					this._syncOffset = "", this._syncNoticeList = [], this._syncEventArray = [],
						this._syncMessagesIsRunning = !1, this._syncMessagesFinished = !1, this
						._isLongPoll = !1, this._longPollID = "0", this._noticeSequence = 0,
						this._initializeListener(), this._runLoop = null, this
						._initShuntChannels()
				}
			}, {
				key: "_initShuntChannels",
				value: function() {
					this._shuntChannels = Object.create(null), this._shuntChannels
						.C2CMessageArray = this._C2CMessageArrayChannel.bind(this), this
						._shuntChannels.groupMessageArray = this._groupMessageArrayChannel.bind(
							this), this._shuntChannels.groupTips = this._groupTipsChannel.bind(
							this), this._shuntChannels.C2CNotifyMessageArray = this
						._C2CNotifyMessageArrayChannel.bind(this), this._shuntChannels
						.profileModify = this._profileModifyChannel.bind(this), this
						._shuntChannels.friendListMod = this._friendListModChannel.bind(this)
				}
			}, {
				key: "_C2CMessageArrayChannel",
				value: function(e, t, n) {
					this.emitInnerEvent(od, t)
				}
			}, {
				key: "_groupMessageArrayChannel",
				value: function(e, t, n) {
					this.emitInnerEvent(id, t)
				}
			}, {
				key: "_groupTipsChannel",
				value: function(e, t, n) {
					var r = this;
					switch (e) {
						case 4:
						case 6:
							this.emitInnerEvent(ad, t);
							break;
						case 5:
							t.forEach((function(e) {
								Ds(e.elements.revokedInfos) ? r.emitInnerEvent(pd,
										t) : Ds(e.elements.groupMessageReadNotice) ?
									r.emitInnerEvent(fd, t) : r.emitInnerEvent(ud, {
										groupSystemNotices: t,
										type: n
									})
							}));
							break;
						case 12:
							this.emitInnerEvent(sd, t);
							break;
						default:
							Ms.log("NotificationController._groupTipsChannel unknown event="
								.concat(e, " type=").concat(n), t)
					}
				}
			}, {
				key: "_C2CNotifyMessageArrayChannel",
				value: function(e, t, n) {
					var r = this;
					Ds(t) && t.forEach((function(e) {
						Ts(e) && (e.hasOwnProperty("kickoutMsgNotify") ? r
							.emitInnerEvent(rd) : e.hasOwnProperty(
								"c2cMessageRevokedNotify") ? r.emitInnerEvent(
								hd, t) : e.hasOwnProperty(
								"c2cMessageReadReceipt") ? r.emitInnerEvent(dd,
								t) : e.hasOwnProperty("c2cMessageReadNotice") &&
							r.emitInnerEvent(gd, t))
					}))
				}
			}, {
				key: "_profileModifyChannel",
				value: function(e, t, n) {
					this.emitInnerEvent(ld, t)
				}
			}, {
				key: "_friendListModChannel",
				value: function(e, t, n) {
					this.emitInnerEvent(cd, t)
				}
			}, {
				key: "_dispatchNotice",
				value: function(e) {
					var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] :
						"poll";
					if (Ds(e))
						for (var n = null, r = null, o = "", i = 0, a = 0, s = e.length; a <
							s; a++) i = (n = e[a]).event, o = Object.keys(n).find((function(e) {
							return void 0 !== Xy[e]
						})), Os(this._shuntChannels[o]) ? (r = n[o], "poll" === t && this
							._updatenoticeSequence(r), this._shuntChannels[o](i, r, t)) : (
							"poll" === t && this._updatenoticeSequence(), Ms.log(
								"NotificationController._dispatchNotice unknown eventItem=",
								n))
				}
			}, {
				key: "getLongPollID",
				value: function() {
					return this._longPollID
				}
			}, {
				key: "_IAmReady",
				value: function() {
					this.triggerReady()
				}
			}, {
				key: "reset",
				value: function() {
					this._noticeSequence = 0, this._resetSync(), this.closeNoticeChannel()
				}
			}, {
				key: "_resetSync",
				value: function() {
					this._syncOffset = "", this._syncNoticeList = [], this._syncEventArray = [],
						this._syncMessagesIsRunning = !1, this._syncMessagesFinished = !1
				}
			}, {
				key: "_setNoticeSeqInRequestData",
				value: function(e) {
					e.Cookie.NoticeSeq = this._noticeSequence, this.tim.sumStatController
						.addTotalCount(eg)
				}
			}, {
				key: "_updatenoticeSequence",
				value: function(e) {
					if (e) {
						var t = e[e.length - 1].noticeSequence;
						t && "number" == typeof t ? t <= this._noticeSequence || (this
							._noticeSequence = t) : this._noticeSequence++
					} else this._noticeSequence++
				}
			}, {
				key: "_initializeListener",
				value: function() {
					var e = this.tim.innerEmitter;
					e.on(Bh, this._startSyncMessages, this), e.on(Id, this.closeNoticeChannel,
						this)
				}
			}, {
				key: "openNoticeChannel",
				value: function() {
					Ms.log("NotificationController.openNoticeChannel"), this._getLongPollID()
				}
			}, {
				key: "closeNoticeChannel",
				value: function() {
					Ms.log("NotificationController.closeNoticeChannel"), (this
							._runLoop instanceof Fv || this._runLoop instanceof Vv) && (this
							._runLoop.abort(), this._runLoop.stop()), this._longPollID = "0",
						this._isLongPoll = !1
				}
			}, {
				key: "_getLongPollID",
				value: function() {
					var e = this;
					if ("0" === this._longPollID) {
						var t = new hg(cm);
						this.request({
							name: "longPollID",
							action: "query"
						}).then((function(n) {
							var r = n.data.longPollingID;
							e._onGetLongPollIDSuccess(r), t.setText("longPollingID="
									.concat(r)).setNetworkType(e.getNetworkType())
								.setEnd()
						})).catch((function(n) {
							var r = new Vp({
								code: n.code || Bp.GET_LONGPOLL_ID_FAILED,
								message: n.message || Qf
							});
							e.emitInnerEvent(Zh), e.emitInnerEvent(Ed, r), e
								.probeNetwork().then((function(e) {
									var n = Un(e, 2),
										o = n[0],
										i = n[1];
									t.setError(r, o, i).setEnd()
								}))
						}))
					} else this._onGetLongPollIDSuccess(this._longPollID)
				}
			}, {
				key: "_onGetLongPollIDSuccess",
				value: function(e) {
					this.emitInnerEvent(jh, [{
							key: "long_poll_logout.query.requestData.longPollingID",
							value: e
						}, {
							key: "longPoll.query.requestData.cookie.longPollingID",
							value: e
						}]), this._longPollID = e, this._startLongPoll(), this._IAmReady(), this
						.tim.sumStatController.recordLongPollingID(this._longPollID)
				}
			}, {
				key: "_startLongPoll",
				value: function() {
					if (!0 !== this._isLongPoll) {
						Ms.log("NotificationController._startLongPoll...");
						var e = this.tim.connectionController,
							t = this.createTransportCapsule({
								name: "longPoll",
								action: "query"
							});
						this._isLongPoll = !0, this._runLoop = e.createRunLoop({
							pack: t,
							before: this._setNoticeSeqInRequestData.bind(this),
							success: this._onNoticeReceived.bind(this),
							fail: this._onNoticeFail.bind(this)
						}), this._runLoop.start()
					} else Ms.log("NotificationController._startLongPoll is running...")
				}
			}, {
				key: "_onNoticeReceived",
				value: function(e) {
					var t = e.data;
					t.errorCode !== Ju.SUCCESS ? (new hg(lm).setMessage(t.errorInfo || JSON
							.stringify(t)).setCode(t.errorCode).setNetworkType(this
							.getNetworkType()).setEnd(!0), this._onResponseError(t)) : this
						.emitInnerEvent(td);
					this.tim.sumStatController.addSuccessCount(eg), this.tim.sumStatController
						.addCost(eg, t.timecost), e.data.eventArray && this._dispatchNotice(e
							.data.eventArray)
				}
			}, {
				key: "_onResponseError",
				value: function(e) {
					switch (e.errorCode) {
						case Bp.LONG_POLL_KICK_OUT:
							Ms.warn("NotificationController._onResponseError, longPollingID="
									.concat(this._longPollID, " was kicked out")), this
								.emitInnerEvent(nd), this.closeNoticeChannel();
							break;
						case Bp.MESSAGE_A2KEY_EXPIRED:
						case Bp.ACCOUNT_A2KEY_EXPIRED:
							this.emitInnerEvent(Cd);
							break;
						default:
							ks(e.errorCode) || ks(e.errorInfo) ? Ms.log(
								"NotificationController._onResponseError, errorCode or errorInfo undefined!",
								e) : this.emitInnerEvent(Ed, new Vp({
								code: e.errorCode,
								message: e.errorInfo
							}))
					}
				}
			}, {
				key: "_onNoticeFail",
				value: function(e) {
					if (e.error)
						if ("ECONNABORTED" === e.error.code || e.error.code === Bp
							.NETWORK_TIMEOUT)
							if (e.error.config) {
								var t = e.error.config.url,
									n = e.error.config.data;
								Ms.log("NotificationController._onNoticeFail request timed out. url="
									.concat(t, " data=").concat(n))
							} else Ms.log(
								"NotificationController._onNoticeFail request timed out.");
					else Ms.log(
						"NotificationController._onNoticeFail request failed due to network error"
						);
					this.emitInnerEvent(ed)
				}
			}, {
				key: "_startSyncMessages",
				value: function(e) {
					!0 !== this._syncMessagesFinished && this.syncMessage()
				}
			}, {
				key: "syncMessage",
				value: function() {
					var e = this,
						t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
						n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
					this._syncMessagesIsRunning = !0, this.request({
						name: "syncMessage",
						action: "query",
						param: {
							cookie: t,
							syncFlag: n
						}
					}).then((function(t) {
						var n = t.data;
						switch (Yy(n.cookie, n.syncFlag)) {
							case "00":
							case "01":
								e.emitInnerEvent(Ed, {
									code: Bp.NOTICE_RUNLOOP_OFFSET_LOST,
									message: Xf
								});
								break;
							case "10":
							case "11":
								n.eventArray && e._dispatchNotice(n.eventArray,
										"sync"), e._syncNoticeList = e
									._syncNoticeList.concat(n.messageList), e
									.emitInnerEvent(Kh, {
										data: n.messageList,
										C2CRemainingUnreadList: n
											.C2CRemainingUnreadList
									}), e._syncOffset = n.cookie, e.syncMessage(n
										.cookie, n.syncFlag);
								break;
							case "12":
								n.eventArray && e._dispatchNotice(n.eventArray,
										"sync"), e.openNoticeChannel(), e
									._syncNoticeList = e._syncNoticeList.concat(n
										.messageList), e.emitInnerEvent(Hh, {
										messageList: n.messageList,
										C2CRemainingUnreadList: n
											.C2CRemainingUnreadList
									}), e._syncOffset = n.cookie, e
									._syncNoticeList = [], e
									._syncMessagesIsRunning = !1, e
									._syncMessagesFinished = !0
						}
					})).catch((function(t) {
						e._syncMessagesIsRunning = !1, Ms.error(
							"NotificationController.syncMessage failed. error:",
							t)
					}))
				}
			}]), n
		}(Kd),
		Zy = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e)).TIMUploadPlugin = null, r.timUploadPlugin = null, r
					.COSSDK = null, r._cosUploadMethod = null, r.expiredTimeLimit = 600, r.appid = 0, r
					.bucketName = "", r.ciUrl = "", r.directory = "", r.downloadUrl = "", r.uploadUrl = "", r
					.expiredTimeOut = r.expiredTimeLimit, r.region = "ap-shanghai", r.cos = null, r
					.cosOptions = {
						secretId: "",
						secretKey: "",
						sessionToken: "",
						expiredTime: 0
					}, r._timer = 0, r.uploadFileType = "", r.duration = 900, r.tryCount = 0, r.tim.innerEmitter
					.on(Bh, r._init, bn(r)), r.triggerReady(), r
			}
			return En(n, [{
				key: "_expiredTimer",
				value: function() {
					var e = this;
					this._timer = setInterval((function() {
						Math.ceil(Date.now() / 1e3) >= e.cosOptions.expiredTime -
							120 && (e._getAuthorizationKey(), clearInterval(e
								._timer))
					}), 6e4)
				}
			}, {
				key: "_init",
				value: function() {
					if (this.TIMUploadPlugin = this.tim.getPlugin("tim-upload-plugin"), this
						.TIMUploadPlugin) this._initUploaderMethod();
					else {
						var e = Fa ? "cos-wx-sdk" : "cos-js-sdk";
						this.COSSDK = this.tim.getPlugin(e), this.COSSDK ? (this
							._getAuthorizationKey(), Ms.warn(
								"UploadController._init v2.9.2起推荐使用 tim-upload-plugin 代替 "
								.concat(e,
									"，上传更快更安全。详细请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#registerPlugin"
									))) : Ms.warn(
							"UploadController._init 没有检测到上传插件，将无法发送图片、音频、视频、文件等类型的消息。详细请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#registerPlugin"
							)
					}
				}
			}, {
				key: "_getAuthorizationKey",
				value: function() {
					var e = this,
						t = Math.ceil(Date.now() / 1e3),
						n = new hg(Ig);
					this.request({
						name: "cosSig",
						action: "query",
						param: {
							duration: this.expiredTimeLimit
						}
					}).then((function(r) {
						Ms.log("UploadController._getAuthorizationKey ok. data:", r
							.data);
						var o = r.data,
							i = o.expiredTime - t;
						n.setText("requestId=".concat(o.requestId, " requestTime=")
								.concat(t, " expiredTime=").concat(o.expiredTime,
									" timeout=").concat(i, "s")).setNetworkType(e
								.getNetworkType()).setEnd(), !Fa && o.region && (e
								.region = o.region), e.appid = o.appid, e
							.bucketName = o.bucketName, e.ciUrl = o.ciUrl, e
							.directory = o.directory, e.downloadUrl = o.downloadUrl,
							e.uploadUrl = o.uploadUrl, e.expiredTimeOut = i, e
							.cosOptions = {
								secretId: o.secretId,
								secretKey: o.secretKey,
								sessionToken: o.sessionToken,
								expiredTime: o.expiredTime
							}, Ms.log(
								"UploadController._getAuthorizationKey cos.config:",
								"region=".concat(e.region, ",bucketName=").concat(e
									.bucketName)), e._initUploaderMethod(), e
							._expiredTimer()
					})).catch((function(t) {
						e.probeNetwork().then((function(e) {
							var r = Un(e, 2),
								o = r[0],
								i = r[1];
							n.setError(t, o, i).setEnd()
						})), Ms.warn(
							"UploadController._getAuthorizationKey failed. error:",
							t)
					}))
				}
			}, {
				key: "_getCosPreSigUrl",
				value: function(e) {
					var t = this,
						n = Math.ceil(Date.now() / 1e3),
						r = new hg(Cg);
					return this.request({
						name: "cosPreSig",
						action: "query",
						param: {
							fileType: e.fileType,
							fileName: e.fileName,
							uploadMethod: e.uploadMethod,
							duration: e.duration
						}
					}).then((function(e) {
						t.tryCount = 0;
						var o = e.data || {},
							i = o.expiredTime - n;
						return Ms.log("UploadController._getCosPreSigUrl ok. data:",
							o), r.setText("requestId=".concat(o.requestId,
							" expiredTime=").concat(o.expiredTime,
							" timeout=").concat(i, "s")).setNetworkType(t
							.getNetworkType()).setEnd(), o
					})).catch((function(n) {
						return -1 === n.code && (n.code = Bp.COS_GET_SIG_FAIL), t
							.probeNetwork().then((function(e) {
								var t = Un(e, 2),
									o = t[0],
									i = t[1];
								r.setError(n, o, i).setEnd()
							})), Ms.warn(
								"UploadController._getCosPreSigUrl failed. error:",
								n), t.tryCount < 1 ? (t.tryCount++, t
								._getCosPreSigUrl(e)) : (t.tryCount = 0, Xd(new Vp({
								code: Bp.COS_GET_SIG_FAIL,
								message: Xp
							})))
					}))
				}
			}, {
				key: "_initUploaderMethod",
				value: function() {
					var e = this;
					if (this.TIMUploadPlugin) return this.timUploadPlugin = new this
						.TIMUploadPlugin, void(this._cosUploadMethod = function(t, n) {
							e.timUploadPlugin.uploadFile(t, n)
						});
					this.appid && (this.cos = Fa ? new this.COSSDK({
						ForcePathStyle: !0,
						getAuthorization: this._getAuthorization.bind(this)
					}) : new this.COSSDK({
						getAuthorization: this._getAuthorization.bind(this)
					}), this._cosUploadMethod = Fa ? function(t, n) {
						e.cos.postObject(t, n)
					} : function(t, n) {
						e.cos.uploadFiles(t, n)
					})
				}
			}, {
				key: "_getAuthorization",
				value: function(e, t) {
					t({
						TmpSecretId: this.cosOptions.secretId,
						TmpSecretKey: this.cosOptions.secretKey,
						XCosSecurityToken: this.cosOptions.sessionToken,
						ExpiredTime: this.cosOptions.expiredTime
					})
				}
			}, {
				key: "uploadImage",
				value: function(e) {
					if (!e.file) return Xd(new Vp({
						code: Bp.MESSAGE_IMAGE_SELECT_FILE_FIRST,
						message: af
					}));
					var t = this._checkImageType(e.file);
					if (!0 !== t) return t;
					var n = this._checkImageMime(e.file);
					if (!0 !== n) return n;
					var r = this._checkImageSize(e.file);
					if (!0 !== r) return r;
					var o = null;
					return this._setUploadFileType(rh), this.upload(e).then((function(e) {
						return o = e, t = "https://".concat(e.location), Fa ?
							new Promise((function(e, n) {
								Ba.getImageInfo({
									src: t,
									success: function(t) {
										e({
											width: t
												.width,
											height: t
												.height
										})
									},
									fail: function() {
										e({
											width: 0,
											height: 0
										})
									}
								})
							})) : es && 9 === ts ? Promise.resolve({
								width: 0,
								height: 0
							}) : new Promise((function(e, n) {
								var r = new Image;
								r.onload = function() {
									e({
										width: this.width,
										height: this.height
									}), r = null
								}, r.onerror = function() {
									e({
										width: 0,
										height: 0
									}), r = null
								}, r.src = t
							}));
						var t
					})).then((function(e) {
						return o.width = e.width, o.height = e.height, Promise
							.resolve(o)
					}))
				}
			}, {
				key: "_checkImageType",
				value: function(e) {
					var t = "";
					return t = Fa ? e.url.slice(e.url.lastIndexOf(".") + 1) : e.files[0].name
						.slice(e.files[0].name.lastIndexOf(".") + 1), th.indexOf(t
						.toLowerCase()) >= 0 || Xd(new Vp({
							code: Bp.MESSAGE_IMAGE_TYPES_LIMIT,
							message: sf
						}))
				}
			}, {
				key: "_checkImageMime",
				value: function(e) {
					return !0
				}
			}, {
				key: "_checkImageSize",
				value: function(e) {
					var t = 0;
					return 0 === (t = Fa ? e.size : e.files[0].size) ? Xd(new Vp({
						code: Bp.MESSAGE_FILE_IS_EMPTY,
						message: "".concat(nf)
					})) : t < 20971520 || Xd(new Vp({
						code: Bp.MESSAGE_IMAGE_SIZE_LIMIT,
						message: "".concat(uf)
					}))
				}
			}, {
				key: "uploadFile",
				value: function(e) {
					var t = null;
					return e.file ? e.file.files[0].size > 104857600 ? (t = new Vp({
						code: Bp.MESSAGE_FILE_SIZE_LIMIT,
						message: mf
					}), Xd(t)) : 0 === e.file.files[0].size ? (t = new Vp({
						code: Bp.MESSAGE_FILE_IS_EMPTY,
						message: "".concat(nf)
					}), Xd(t)) : (this._setUploadFileType(ah), this.upload(e)) : (t =
						new Vp({
							code: Bp.MESSAGE_FILE_SELECT_FILE_FIRST,
							message: gf
						}), Xd(t))
				}
			}, {
				key: "uploadVideo",
				value: function(e) {
					return e.file.videoFile.size > 104857600 ? Xd(new Vp({
						code: Bp.MESSAGE_VIDEO_SIZE_LIMIT,
						message: "".concat(ff)
					})) : 0 === e.file.videoFile.size ? Xd(new Vp({
						code: Bp.MESSAGE_FILE_IS_EMPTY,
						message: "".concat(nf)
					})) : -1 === nh.indexOf(e.file.videoFile.type) ? Xd(new Vp({
						code: Bp.MESSAGE_VIDEO_TYPES_LIMIT,
						message: "".concat(hf)
					})) : (this._setUploadFileType(oh), Fa ? this.handleVideoUpload({
						file: e.file.videoFile
					}) : Va ? this.handleVideoUpload(e) : void 0)
				}
			}, {
				key: "handleVideoUpload",
				value: function(e) {
					var t = this;
					return new Promise((function(n, r) {
						t.upload(e).then((function(e) {
							n(e)
						})).catch((function() {
							t.upload(e).then((function(e) {
								n(e)
							})).catch((function() {
								r(new Vp({
									code: Bp
										.MESSAGE_VIDEO_UPLOAD_FAIL,
									message: pf
								}))
							}))
						}))
					}))
				}
			}, {
				key: "uploadAudio",
				value: function(e) {
					return e.file ? e.file.size > 20971520 ? Xd(new Vp({
						code: Bp.MESSAGE_AUDIO_SIZE_LIMIT,
						message: "".concat(lf)
					})) : 0 === e.file.size ? Xd(new Vp({
						code: Bp.MESSAGE_FILE_IS_EMPTY,
						message: "".concat(nf)
					})) : (this._setUploadFileType(ih), this.upload(e)) : Xd(new Vp({
						code: Bp.MESSAGE_AUDIO_UPLOAD_FAIL,
						message: cf
					}))
				}
			}, {
				key: "upload",
				value: function(e) {
					var t = this;
					if (!Os(this._cosUploadMethod)) return Ms.warn(
						"UploadController.upload 没有检测到上传插件，将无法发送图片、音频、视频、文件等类型的消息。详细请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#registerPlugin"
						), Xd(new Vp({
						code: Bp.COS_UNDETECTED,
						message: Jp
					}));
					if (this.timUploadPlugin) return this._uploadWithPreSigUrl(e);
					var n = new hg(Eg);
					Ms.time(fg);
					var r = Fa ? e.file : e.file.files[0];
					return new Promise((function(o, i) {
						var a = Fa ? t._createCosOptionsWXMiniApp(e) : t
							._createCosOptionsWeb(e),
							s = t;
						t._cosUploadMethod(a, (function(e, a) {
							var u = Object.create(null);
							if (a) {
								if (e || Ds(a.files) && a.files[0]
									.error) {
									var c = new Vp({
										code: Bp
											.MESSAGE_FILE_UPLOAD_FAIL,
										message: df
									});
									return n.setError(c, !0, t
											.getNetworkType()).setEnd(),
										Ms.log(
											"UploadController.upload failed, error:",
											a.files[0].error), 403 === a
										.files[0].error.statusCode && (
											Ms.warn(
												"UploadController.upload failed. cos AccessKeyId was invalid, regain auth key!"
												), t
											._getAuthorizationKey()),
										void i(c)
								}
								u.fileName = r.name, u.fileSize = r
									.size, u.fileType = r.type.slice(r
										.type.indexOf("/") + 1)
									.toLowerCase(), u.location = Fa ? a
									.Location : a.files[0].data
									.Location;
								var l = Ms.timeEnd(fg),
									p = s._formatFileSize(r.size),
									f = s._formatSpeed(1e3 * r.size /
									l),
									h = "size=".concat(p, ",time=")
									.concat(l, "ms,speed=").concat(f);
								return Ms.log(
										"UploadController.upload success name="
										.concat(r.name, ",").concat(h)),
									o(u), void n.setNetworkType(t
										.getNetworkType()).setText(h)
									.setEnd()
							}
							var d = new Vp({
								code: Bp
									.MESSAGE_FILE_UPLOAD_FAIL,
								message: df
							});
							n.setError(d, !0, s.getNetworkType())
								.setEnd(), Ms.warn(
									"UploadController.upload failed, error:",
									e), 403 === e.statusCode && (Ms
									.warn(
										"UploadController.upload failed. cos AccessKeyId was invalid, regain auth key!"
										), t._getAuthorizationKey()), i(
									d)
						}))
					}))
				}
			}, {
				key: "_uploadWithPreSigUrl",
				value: function(e) {
					var t = this,
						n = Fa ? e.file : e.file.files[0];
					return this._createCosOptionsPreSigUrl(e).then((function(e) {
						return new Promise((function(r, o) {
							var i = new hg(Eg);
							Ms.time(fg), t._cosUploadMethod(e, (
								function(e, a) {
									var s = Object.create(null);
									if (e || 403 === a
										.statusCode) {
										var u = new Vp({
											code: Bp
												.MESSAGE_FILE_UPLOAD_FAIL,
											message: df
										});
										return i.setError(u, !0,
												t
												.getNetworkType()
												).setEnd(), Ms
											.log(
												"UploadController._uploadWithPreSigUrl failed, error:",
												e), void o(u)
									}
									var c = a.data.location ||
										"";
									0 !== c.indexOf(
										"https://") && 0 !== c
										.indexOf("http://") || (
											c = c.split("//")[1]
											), s.fileName = n
										.name, s.fileSize = n
										.size, s.fileType = n
										.type.slice(n.type
											.indexOf("/") + 1)
										.toLowerCase(), s
										.location = c;
									var l = Ms.timeEnd(fg),
										p = t._formatFileSize(n
											.size),
										f = t._formatSpeed(1e3 *
											n.size / l),
										h = "size=".concat(p,
											",time=").concat(l,
											"ms,speed=").concat(
											f);
									Ms.log("UploadController._uploadWithPreSigUrl success name="
											.concat(n.name, ",")
											.concat(h)), i
										.setNetworkType(t
											.getNetworkType())
										.setText(h).setEnd(), r(
											s)
								}))
						}))
					}))
				}
			}, {
				key: "_formatFileSize",
				value: function(e) {
					return e < 1024 ? e + "B" : e < 1048576 ? Math.floor(e / 1024) + "KB" : Math
						.floor(e / 1048576) + "MB"
				}
			}, {
				key: "_formatSpeed",
				value: function(e) {
					return e <= 1048576 ? (e / 1024).toFixed(1) + "KB/s" : (e / 1048576)
						.toFixed(1) + "MB/s"
				}
			}, {
				key: "_createCosOptionsWeb",
				value: function(e) {
					var t = this._genFileName(e.file.files[0].name);
					return {
						files: [{
							Bucket: "".concat(this.bucketName, "-").concat(this.appid),
							Region: this.region,
							Key: "".concat(this.directory, "/").concat(t),
							Body: e.file.files[0]
						}],
						SliceSize: 1048576,
						onProgress: function(t) {
							if ("function" == typeof e.onProgress) try {
								e.onProgress(t.percent)
							} catch (n) {
								Ms.warn("onProgress callback error:", n), Ms.error(n)
							}
						},
						onFileFinish: function(e, t, n) {}
					}
				}
			}, {
				key: "_createCosOptionsWXMiniApp",
				value: function(e) {
					var t = this._genFileName(e.file.name),
						n = e.file.url;
					return {
						Bucket: "".concat(this.bucketName, "-").concat(this.appid),
						Region: this.region,
						Key: "".concat(this.directory, "/").concat(t),
						FilePath: n,
						onProgress: function(t) {
							if (Ms.log(JSON.stringify(t)), "function" == typeof e
								.onProgress) try {
								e.onProgress(t.percent)
							} catch (n) {
								Ms.warn("onProgress callback error:", n), Ms.error(n)
							}
						}
					}
				}
			}, {
				key: "_createCosOptionsPreSigUrl",
				value: function(e) {
					var t = this,
						n = "",
						r = "",
						o = 0;
					return Fa ? (n = this._genFileName(e.file.name), r = e.file.url, o = 1) : (
						n = this._genFileName("".concat(xs(999999))), r = e.file.files[0],
						o = 0), this._getCosPreSigUrl({
						fileType: this.uploadFileType,
						fileName: n,
						uploadMethod: o,
						duration: this.duration
					}).then((function(o) {
						var i = o.uploadUrl,
							a = o.downloadUrl;
						return {
							url: i,
							fileType: t.uploadFileType,
							fileName: n,
							resources: r,
							downloadUrl: a,
							onProgress: function(t) {
								if ("function" == typeof e.onProgress) try {
									e.onProgress(t.percent)
								} catch (n) {
									Ms.warn("onProgress callback error:",
										n), Ms.error(n)
								}
							}
						}
					}))
				}
			}, {
				key: "_genFileName",
				value: function(e) {
					return "".concat(eu(), "-").concat(e)
				}
			}, {
				key: "_setUploadFileType",
				value: function(e) {
					this.uploadFileType = e
				}
			}, {
				key: "reset",
				value: function() {
					this._timer && (clearInterval(this._timer), this._timer = 0)
				}
			}]), n
		}(Kd),
		e_ = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e)).FILETYPE = {
						SOUND: 2106,
						FILE: 2107,
						VIDEO: 2113
					}, r._bdh_download_server = "grouptalk.c2c.qq.com", r._BDHBizID = 10001, r._authKey = "", r
					._expireTime = 0, r.tim.innerEmitter.on(Bh, r._getAuthKey, bn(r)), r
			}
			return En(n, [{
				key: "_getAuthKey",
				value: function() {
					var e = this;
					this.request({
						name: "bigDataHallwayAuthKey",
						action: "query"
					}).then((function(t) {
						t.data.authKey && (e._authKey = t.data.authKey, e
							._expireTime = parseInt(t.data.expireTime))
					}))
				}
			}, {
				key: "_isFromOlderVersion",
				value: function(e) {
					return !(!e.content || 2 === e.content.downloadFlag)
				}
			}, {
				key: "parseElements",
				value: function(e, t) {
					if (!Ds(e) || !t) return [];
					for (var n = [], r = null, o = 0; o < e.length; o++) r = e[o], this
						._needParse(r) ? n.push(this._parseElement(r, t)) : n.push(e[o]);
					return n
				}
			}, {
				key: "_needParse",
				value: function(e) {
					return !(!this._isFromOlderVersion(e) || e.type !== _n.MSG_AUDIO && e
						.type !== _n.MSG_FILE && e.type !== _n.MSG_VIDEO)
				}
			}, {
				key: "_parseElement",
				value: function(e, t) {
					switch (e.type) {
						case _n.MSG_AUDIO:
							return this._parseAudioElement(e, t);
						case _n.MSG_FILE:
							return this._parseFileElement(e, t);
						case _n.MSG_VIDEO:
							return this._parseVideoElement(e, t)
					}
				}
			}, {
				key: "_parseAudioElement",
				value: function(e, t) {
					return e.content.url = this._genAudioUrl(e.content.uuid, t), e
				}
			}, {
				key: "_parseFileElement",
				value: function(e, t) {
					return e.content.url = this._genFileUrl(e.content.uuid, t, e.content
						.fileName), e
				}
			}, {
				key: "_parseVideoElement",
				value: function(e, t) {
					return e.content.url = this._genVideoUrl(e.content.uuid, t), e
				}
			}, {
				key: "_genAudioUrl",
				value: function(e, t) {
					return "" === this._authKey ? (Ms.warn(
							"BigDataHallwayController._genAudioUrl no authKey!"), "") :
						"https://".concat(this._bdh_download_server,
							"/asn.com/stddownload_common_file?authkey=").concat(this._authKey,
							"&bid=").concat(this._BDHBizID, "&subbid=").concat(this.tim.context
							.SDKAppID, "&fileid=").concat(e, "&filetype=").concat(this.FILETYPE
							.SOUND, "&openid=").concat(t, "&ver=0")
				}
			}, {
				key: "_genFileUrl",
				value: function(e, t, n) {
					return "" === this._authKey ? (Ms.warn(
						"BigDataHallwayController._genFileUrl no authKey!"), "") : (n || (
							n = "".concat(Math.floor(1e5 * Math.random()), "-").concat(Date
								.now())), "https://".concat(this._bdh_download_server,
							"/asn.com/stddownload_common_file?authkey=").concat(this
							._authKey, "&bid=").concat(this._BDHBizID, "&subbid=").concat(
							this.tim.context.SDKAppID, "&fileid=").concat(e, "&filetype=")
						.concat(this.FILETYPE.FILE, "&openid=").concat(t,
							"&ver=0&filename=").concat(encodeURIComponent(n)))
				}
			}, {
				key: "_genVideoUrl",
				value: function(e, t) {
					return "" === this._authKey ? (Ms.warn(
							"BigDataHallwayController._genVideoUrl no authKey!"), "") :
						"https://".concat(this._bdh_download_server,
							"/asn.com/stddownload_common_file?authkey=").concat(this._authKey,
							"&bid=").concat(this._BDHBizID, "&subbid=").concat(this.tim.context
							.SDKAppID, "&fileid=").concat(e, "&filetype=").concat(this.FILETYPE
							.VIDEO, "&openid=").concat(t, "&ver=0")
				}
			}, {
				key: "reset",
				value: function() {
					this._authKey = "", this.expireTime = 0
				}
			}]), n
		}(Kd),
		t_ = function() {
			function e(t) {
				In(this, e), this._table = "timwebii", this._report = []
			}
			return En(e, [{
				key: "pushIn",
				value: function(e) {
					Ms.debug("SSOLogBody.pushIn", this._report.length, e), this._report.push(e)
				}
			}, {
				key: "backfill",
				value: function(e) {
					var t;
					Ds(e) && 0 !== e.length && (Ms.debug("SSOLogBody.backfill", this._report
						.length, e.length), (t = this._report).unshift.apply(t, qn(e)))
				}
			}, {
				key: "getLogsNumInMemory",
				value: function() {
					return this._report.length
				}
			}, {
				key: "isEmpty",
				value: function() {
					return 0 === this._report.length
				}
			}, {
				key: "_reset",
				value: function() {
					this._report.length = 0, this._report = []
				}
			}, {
				key: "getTable",
				value: function() {
					return this._table
				}
			}, {
				key: "getLogsInMemory",
				value: function() {
					var e = this._report.slice();
					return this._reset(), e
				}
			}]), e
		}(),
		n_ = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e)).TAG = "im-ssolog-event", r._reportBody = new t_, r
					._version = "2.10.1", r.MIN_THRESHOLD = 20, r.MAX_THRESHOLD = 100, r.WAITING_TIME = 6e4, r
					.INTERVAL = 2e4, r._timerID = 0, r._resetLastReportTime(), r._startReportTimer(), r
					._retryCount = 0, r.MAX_RETRY_COUNT = 3, r.tim.innerEmitter.on(_d, r._onLoginSuccess, bn(
					r)), r
			}
			return En(n, [{
				key: "reportAtOnce",
				value: function() {
					Ms.debug("EventStatController.reportAtOnce"), this._report()
				}
			}, {
				key: "_onLoginSuccess",
				value: function() {
					var e = this,
						t = this.tim.storage,
						n = t.getItem(this.TAG, !1);
					!ou(n) && Os(n.forEach) && (Ms.log(
						"EventStatController._onLoginSuccess get ssolog in storage, nums=" +
						n.length), n.forEach((function(t) {
						e._reportBody.pushIn(t)
					})), t.removeItem(this.TAG, !1))
				}
			}, {
				key: "pushIn",
				value: function(e) {
					e instanceof hg && (e.setCommonInfo({
						SDKAppID: this.tim.context.SDKAppID,
						version: this._version,
						tinyID: this.tim.context.tinyID,
						userID: this.tim.loginInfo.identifier,
						platform: this.getPlatform(),
						scene: this.tim.context.scene,
						instanceID: this.tim.context.instanceID
					}), this._reportBody.pushIn(e), this._reportBody
					.getLogsNumInMemory() >= this.MIN_THRESHOLD && this._report())
				}
			}, {
				key: "_resetLastReportTime",
				value: function() {
					this._lastReportTime = Date.now()
				}
			}, {
				key: "_startReportTimer",
				value: function() {
					var e = this;
					this._timerID = setInterval((function() {
						Date.now() < e._lastReportTime + e.WAITING_TIME || e
							._reportBody.isEmpty() || e._report()
					}), this.INTERVAL)
				}
			}, {
				key: "_stopReportTimer",
				value: function() {
					this._timerID > 0 && (clearInterval(this._timerID), this._timerID = 0)
				}
			}, {
				key: "_report",
				value: function() {
					var e = this;
					if (!this._reportBody.isEmpty()) {
						var t = this._reportBody.getLogsInMemory();
						this.request({
							name: "ssoEventStat",
							action: "create",
							param: {
								table: this._reportBody.getTable(),
								report: t
							}
						}).then((function() {
							e._resetLastReportTime(), e._retryCount > 0 && (Ms
								.debug(
									"EventStatController.report retry success"),
								e._retryCount = 0)
						})).catch((function(n) {
							if (Ms.warn("EventStatController.report, networkType:"
									.concat(e.getNetworkType(), " error:").concat(
										Gs(n))), e._reportBody.backfill(t), e
								._reportBody.getLogsNumInMemory() > e
								.MAX_THRESHOLD || e._retryCount === e
								.MAX_RETRY_COUNT || 0 === e._timerID) return e
								._retryCount = 0, void e._flushAtOnce();
							e._retryCount += 1
						}))
					}
				}
			}, {
				key: "_flushAtOnce",
				value: function() {
					var e = this.tim.storage,
						t = e.getItem(this.TAG, !1),
						n = this._reportBody.getLogsInMemory();
					if (ou(t)) Ms.log("EventStatController._flushAtOnce nums=" + n.length), e
						.setItem(this.TAG, n, !0, !1);
					else {
						var r = n.concat(t);
						r.length > this.MAX_THRESHOLD && (r = r.slice(0, this.MAX_THRESHOLD)),
							Ms.log("EventStatController._flushAtOnce nums=" + r.length), e
							.setItem(this.TAG, r, !0, !1)
					}
				}
			}, {
				key: "reset",
				value: function() {
					Ms.log("EventStatController.reset"), this._stopReportTimer(), this._report()
				}
			}]), n
		}(Kd),
		r_ = "none",
		o_ = "online",
		i_ = function() {
			function e() {
				In(this, e), this._networkType = "", this.maxWaitTime = 3e3
			}
			return En(e, [{
				key: "start",
				value: function() {
					var e = this;
					Fa ? (Ba.getNetworkType({
							success: function(t) {
								e._networkType = t.networkType, t.networkType ===
									r_ ? Ms.warn(
										"NetMonitor no network, please check!") : Ms
									.info("NetMonitor networkType:".concat(t
										.networkType))
							}
						}), Ba.onNetworkStatusChange(this._onNetworkStatusChange.bind(
						this))) : this._networkType = o_
				}
			}, {
				key: "_onNetworkStatusChange",
				value: function(e) {
					this._networkType = e.networkType, e.isConnected ? Ms.info(
						"NetMonitor networkType:".concat(e.networkType)) : Ms.warn(
						"NetMonitor no network, please check!")
				}
			}, {
				key: "probe",
				value: function() {
					var e = this;
					return new Promise((function(t, n) {
						if (Fa) Ba.getNetworkType({
							success: function(n) {
								e._networkType = n.networkType, n
									.networkType === r_ ? (Ms.warn(
										"NetMonitor no network, please check!"
										), t([!1, n.networkType])) : (Ms
										.info("NetMonitor networkType:"
											.concat(n.networkType)), t([
											!0, n.networkType
										]))
							}
						});
						else if (window && window.fetch) fetch("".concat(Ks(),
							"//webim-1252463788.file.myqcloud.com/assets/test/speed.xml?random="
							).concat(Math.random())).then((function(e) {
							e.ok ? t([!0, o_]) : t([!1, r_])
						})).catch((function(e) {
							t([!1, r_])
						}));
						else {
							var r = new XMLHttpRequest,
								o = setTimeout((function() {
									Ms.warn(
											"NetMonitor fetch timeout. Probably no network, please check!"),
										r.abort(), e._networkType = r_, t([!
											1, r_
										])
								}), e.maxWaitTime);
							r.onreadystatechange = function() {
								4 === r.readyState && (clearTimeout(o), 200 ===
									r.status || 304 === r.status ? (this
										._networkType = o_, t([!0, o_])) : (
										Ms.warn("NetMonitor fetch status:"
											.concat(r.status,
												". Probably no network, please check!"
												)), this._networkType = r_,
										t([!1, r_])))
							}, r.open("GET", "".concat(Ks(),
								"//webim-1252463788.file.myqcloud.com/assets/test/speed.xml?random="
								).concat(Math.random())), r.send()
						}
					}))
				}
			}, {
				key: "getNetworkType",
				value: function() {
					return this._networkType
				}
			}, {
				key: "reset",
				value: function() {
					this._networkType = ""
				}
			}]), e
		}(),
		a_ = function() {
			function e(t) {
				var n = this;
				In(this, e), Ds(t) ? (this._map = new Map, t.forEach((function(e) {
					n._map.set(e, [])
				}))) : Ms.warn("AverageCalculator.constructor need keys")
			}
			return En(e, [{
				key: "push",
				value: function(e, t) {
					return !(ks(e) || !this._map.has(e) || !Cs(t)) && (this._map.get(e).push(t),
						!0)
				}
			}, {
				key: "getSize",
				value: function(e) {
					return ks(e) || !this._map.has(e) ? -1 : this._map.get(e).length
				}
			}, {
				key: "getAvg",
				value: function(e) {
					if (ks(e) || !this._map.has(e)) return -1;
					var t = this._map.get(e),
						n = t.length;
					if (0 === n) return 0;
					var r = 0;
					return t.forEach((function(e) {
						r += e
					})), t.length = 0, this._map.set(e, []), parseInt(r / n)
				}
			}, {
				key: "getMax",
				value: function(e) {
					return ks(e) || !this._map.has(e) ? -1 : Math.max.apply(null, this._map.get(
						e))
				}
			}, {
				key: "getMin",
				value: function(e) {
					return ks(e) || !this._map.has(e) ? -1 : Math.min.apply(null, this._map.get(
						e))
				}
			}, {
				key: "reset",
				value: function() {
					this._map.forEach((function(e) {
						e.length = 0
					}))
				}
			}]), e
		}(),
		s_ = function() {
			function e(t) {
				var n = this;
				In(this, e), Ds(t) ? (this._map = new Map, t.forEach((function(e) {
					n._map.set(e, {
						totalCount: 0,
						successCount: 0
					})
				}))) : Ms.warn("SuccessRateCalculator.constructor need keys")
			}
			return En(e, [{
				key: "addTotalCount",
				value: function(e) {
					return !(ks(e) || !this._map.has(e)) && (this._map.get(e).totalCount += 1, !
						0)
				}
			}, {
				key: "addSuccessCount",
				value: function(e) {
					return !(ks(e) || !this._map.has(e)) && (this._map.get(e).successCount += 1,
						!0)
				}
			}, {
				key: "getSuccessRate",
				value: function(e) {
					if (ks(e) || !this._map.has(e)) return -1;
					var t = this._map.get(e);
					if (0 === t.totalCount) return 1;
					var n = parseFloat((t.successCount / t.totalCount).toFixed(2));
					return n > 1 && (n = 1), t.totalCount = t.successCount = 0, n
				}
			}, {
				key: "getTotalCount",
				value: function(e) {
					return ks(e) || !this._map.has(e) ? -1 : this._map.get(e).totalCount
				}
			}, {
				key: "reset",
				value: function() {
					this._map.forEach((function(e) {
						e.totalCount = 0, e.successCount = 0
					}))
				}
			}]), e
		}(),
		u_ = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e)).TABLE = "timwebsum", r.TAG = "im-ssolog-sumstat", r
					._items = [eg, tg, ng, rg, og, ig, ag, sg, ug, cg], r._thresholdMap = new Map, r
					._thresholdMap.set(eg, 100), r._thresholdMap.set(tg, 150), r._thresholdMap.set(ng, 15), r
					._thresholdMap.set(rg, 6), r._thresholdMap.set(og, 6), r._thresholdMap.set(ig, 6), r
					._thresholdMap.set(ag, 6), r._thresholdMap.set(sg, 6), r._thresholdMap.set(ug, 50), r
					._thresholdMap.set(cg, 50), r._lpID = "", r._platform = r.getPlatform(), r._lastReportTime =
					0, r._statInfoArr = [], r._retryCount = 0, r._avgCalc = new a_(r._items), r
					._successRateCalc = new s_(r._items), r.tim.innerEmitter.on(_d, r._onLoginSuccess, bn(r)), r
			}
			return En(n, [{
				key: "_onLoginSuccess",
				value: function() {
					var e = this,
						t = this.tim.storage,
						n = t.getItem(this.TAG, !1);
					!ou(n) && Os(n.forEach) && (Ms.log(
						"SumStatController._onLoginSuccess get sumstatlog in storage, nums=" +
						n.length), n.forEach((function(t) {
						e._statInfoArr.push(t)
					})), t.removeItem(this.TAG, !1))
				}
			}, {
				key: "recordLongPollingID",
				value: function(e) {
					this._lpID = e
				}
			}, {
				key: "addTotalCount",
				value: function(e) {
					this._successRateCalc.addTotalCount(e) ? 1 === this._successRateCalc
						.getTotalCount(e) && (this._lastReportTime = Date.now()) : Ms.warn(
							"SumStatController.addTotalCount invalid key:", e)
				}
			}, {
				key: "addSuccessCount",
				value: function(e) {
					this._successRateCalc.addSuccessCount(e) || Ms.warn(
						"SumStatController.addSuccessCount invalid key:", e)
				}
			}, {
				key: "addCost",
				value: function(e, t) {
					this._avgCalc.push(e, t) ? (Ms.debug("SumStatController.addCost", e, t, this
							._avgCalc.getSize(e)), this._avgCalc.getSize(e) >= this
						._thresholdMap.get(e) && this._report(e)) : Ms.warn(
						"SumStatController.addCost invalid key or cost:", e, t)
				}
			}, {
				key: "_getItemNum",
				value: function(e) {
					switch (e) {
						case eg:
							return 1;
						case tg:
							return 2;
						case ng:
							return 3;
						case ug:
							return 4;
						case cg:
							return 5;
						case rg:
							return 6;
						case og:
							return 7;
						case ig:
							return 8;
						case ag:
							return 9;
						case sg:
							return 10;
						default:
							return 100
					}
				}
			}, {
				key: "_getStatInfo",
				value: function(e) {
					var t = null;
					return this._avgCalc.getSize(e) > 0 && (t = {
						SDKAppID: "".concat(this.tim.context.SDKAppID),
						version: "".concat("2.10.1"),
						tinyID: this.tim.context.tinyID,
						userID: this.tim.loginInfo.identifier,
						item: this._getItemNum(e),
						lpID: e === eg ? this._lpID : "",
						platform: this._platform,
						scene: this.tim.context.scene,
						networkType: this.getNetworkType(),
						total: this._successRateCalc.getTotalCount(e),
						successRate: this._successRateCalc.getSuccessRate(e),
						avg: this._avgCalc.getAvg(e),
						timespan: Date.now() - this._lastReportTime,
						time: Us()
					}), t
				}
			}, {
				key: "_report",
				value: function(e) {
					var t = this,
						n = [],
						r = null;
					ks(e) ? this._items.forEach((function(e) {
							null !== (r = t._getStatInfo(e)) && n.push(r)
						})) : null !== (r = this._getStatInfo(e)) && n.push(r), Ms.debug(
							"SumStatController._report", n), this._statInfoArr.length > 0 && (
							n = n.concat(this.statInfoArr), this._statInfoArr = []), this
						._doReport(n)
				}
			}, {
				key: "_doReport",
				value: function(e) {
					var t = this;
					ou(e) ? Ms.warn(
							"SumStatController._doReport statInfoArr is empty, do nothing") :
						this.request({
							name: "ssoSumStat",
							action: "create",
							param: {
								table: this.TABLE,
								report: e
							}
						}).then((function() {
							t._lastReportTime = Date.now(), t._retryCount > 0 && (Ms
								.debug("SumStatController._doReport retry success"),
								t._retryCount = 0)
						})).catch((function(n) {
							Ms.warn("SumStatController._doReport, online:".concat(t
									.getNetworkType(), " error:").concat(Gs(n)), e), t
								._retryCount <= 1 ? setTimeout((function() {
									Ms.info("SumStatController._doReport retry",
										e), t._retryCount += 1, t._doReport(
										e)
								}), 5e3) : (t._retryCount = 0, t._statInfoArr = t
									._statInfoArr.concat(e), t._flushAtOnce())
						}))
				}
			}, {
				key: "_flushAtOnce",
				value: function() {
					var e = this.tim.storage,
						t = e.getItem(this.TAG, !1),
						n = this._statInfoArr;
					if (ou(t)) Ms.log("SumStatController._flushAtOnce nums=" + n.length), e
						.setItem(this.TAG, n, !0, !1);
					else {
						var r = n.concat(t);
						r.length > 10 && (r = r.slice(0, 10)), Ms.log(
							"SumStatController._flushAtOnce nums=" + r.length), e.setItem(
							this.TAG, r, !0, !1)
					}
					this._statInfoArr = []
				}
			}, {
				key: "reset",
				value: function() {
					Ms.info("SumStatController.reset"), this._report(), this._avgCalc.reset(),
						this._successRateCalc.reset()
				}
			}]), n
		}(Kd),
		c_ = function() {
			function e() {
				In(this, e), this._funcMap = new Map
			}
			return En(e, [{
				key: "defense",
				value: function(e, t) {
					var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] :
						void 0;
					if ("string" != typeof e) return null;
					if (0 === e.length) return null;
					if ("function" != typeof t) return null;
					if (this._funcMap.has(e) && this._funcMap.get(e).has(t)) return this
						._funcMap.get(e).get(t);
					this._funcMap.has(e) || this._funcMap.set(e, new Map);
					var r = null;
					return this._funcMap.get(e).has(t) ? r = this._funcMap.get(e).get(t) : (r =
						this._pack(e, t, n), this._funcMap.get(e).set(t, r)), r
				}
			}, {
				key: "defenseOnce",
				value: function(e, t) {
					var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] :
						void 0;
					return "function" != typeof t ? null : this._pack(e, t, n)
				}
			}, {
				key: "find",
				value: function(e, t) {
					return "string" != typeof e || 0 === e.length || "function" != typeof t ?
						null : this._funcMap.has(e) ? this._funcMap.get(e).has(t) ? this
						._funcMap.get(e).get(t) : (Ms.log("SafetyCallback.find: 找不到 func —— "
								.concat(e, "/").concat("" !== t.name ? t.name : "[anonymous]")),
							null) : (Ms.log("SafetyCallback.find: 找不到 eventName-".concat(e,
							" 对应的 func")), null)
				}
			}, {
				key: "delete",
				value: function(e, t) {
					return "function" == typeof t && (!!this._funcMap.has(e) && (!!this._funcMap
						.get(e).has(t) && (this._funcMap.get(e).delete(t), 0 === this
							._funcMap.get(e).size && this._funcMap.delete(e), !0)))
				}
			}, {
				key: "_pack",
				value: function(e, t, n) {
					return function() {
						try {
							t.apply(n, Array.from(arguments))
						} catch (a) {
							var r = Object.values(yn).indexOf(e);
							if (-1 !== r) {
								var o = Object.keys(yn)[r];
								Ms.warn("接入侧事件 TIM.EVENT.".concat(o, " 对应的回调函数逻辑存在问题，请检查！"),
									a)
							}
							var i = new hg(Im);
							i.setText("eventName=".concat(e)).setMessage(a.message).setEnd()
						}
					}
				}
			}]), e
		}(),
		l_ = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e))._maybeLostSequencesMap = new Map, r
			}
			return En(n, [{
				key: "onMessageMaybeLost",
				value: function(e, t, n) {
					this._maybeLostSequencesMap.has(e) || this._maybeLostSequencesMap.set(e,
				[]);
					for (var r = this._maybeLostSequencesMap.get(e), o = 0; o < n; o++) r.push(
						t + o);
					Ms.debug("MessageLossController.onMessageMaybeLost. maybeLostSequences:"
						.concat(r))
				}
			}, {
				key: "detectMessageLoss",
				value: function(e, t) {
					var n = this._maybeLostSequencesMap.get(e);
					if (!ou(n) && !ou(t)) {
						var r = t.filter((function(e) {
							return -1 !== n.indexOf(e)
						}));
						if (Ms.debug(
								"MessageLossController.detectMessageLoss. matchedSequences:"
								.concat(r)), n.length === r.length) Ms.info(
							"MessageLossController.detectMessageLoss no message loss. conversationID="
							.concat(e));
						else {
							var o, i = n.filter((function(e) {
									return -1 === r.indexOf(e)
								})),
								a = i.length;
							a <= 5 ? o = e + "-" + i.join("-") : (i.sort((function(e, t) {
									return e - t
								})), o = e + " start:" + i[0] + " end:" + i[a - 1] +
								" count:" + a), new hg(hm).setText(o).setNetworkType(this
								.getNetworkType()).setEnd(), Ms.warn(
								"MessageLossController.detectMessageLoss message loss detected. conversationID:"
								.concat(e, " lostSequences:").concat(i))
						}
						n.length = 0
					}
				}
			}, {
				key: "reset",
				value: function() {
					Ms.log("MessageLossController.reset"), this._maybeLostSequencesMap.clear()
				}
			}]), n
		}(Kd),
		p_ = function(e) {
			kn(n, e);
			var t = Gn(n);

			function n(e) {
				var r;
				return In(this, n), (r = t.call(this, e))._request = Fa ? new Gv : new Pv, r
			}
			return En(n, [{
				key: "sendMessage",
				value: function(e) {
					var t = this,
						n = this._constructMessageInstance(e);
					if (null === n) return Xd({
						code: Bp.MESSAGE_SEND_FAIL,
						message: Qp
					});
					var r = Date.now(),
						o = ou(e.GroupId) ? "openim/sendmsg" :
						"group_open_http_svc/send_group_msg",
						i = this.tim.context,
						a = i.a2Key,
						s = i.tinyID,
						u = i.SDKAppID,
						c = i.identifier,
						l = {
							url: "https://" + (!0 === this.tim.context.oversea ?
									"api.im.qcloud.com" : "webim.tim.qq.com") + "/v4/" + o +
								"?platform=10&websdkappid=537048168&v=1.7.3&a2=" + a +
								"&tinyid=" + s + "&sdkappid=" + u +
								"&contentType=json&apn=1&reqtime=" + Date.now() + "tjg_id=" +
								this._generateTjgID(n),
							data: e,
							method: "POST"
						};
					this._addSendMessageTotalCount(n);
					var p = new hg(Tg);
					return p.setText("".concat(this._generateTjgID(n), "-").concat(n.from, "-")
							.concat(n.to, "-").concat(n.getElements().length)), this._request
						.request(l).then((function(e) {
							var o = e.data,
								i = o.ErrorCode,
								a = o.ErrorInfo;
							if (0 !== i) return p.setCode(i).setMessage(a)
								.setNetworkType(t.getNetworkType()).setEnd(), n
								.status = Qu.FAIL, Xd(new Vp({
									code: i,
									message: a || Qp,
									data: {
										message: n
									}
								}));
							t._addSendMessageSuccessCount(n, r), n.status = Qu.SUCCESS;
							var s = e.data,
								u = s.MsgTime,
								l = s.MsgSeq;
							return n.time = u, l && (n.sequence = l), n
								.generateMessageID(c), t.tim.messageController
								.pushToMessageList(n), t.emitInnerEvent($h, {
									eventDataList: [{
										conversationID: n.conversationID,
										unreadCount: 0,
										type: n.conversationType,
										subType: n.conversationSubType,
										lastMessage: n
									}]
								}), Jd(n)
						})).catch((function(e) {
							return t.probeNetwork().then((function(t) {
								var n = Un(t, 2),
									r = n[0],
									o = n[1];
								p.setError(e, r, o).setEnd()
							})), Ms.warn(
								"ComboMessageController.sendMessage failed. error:",
								e), n.status = Qu.FAIL, Xd(new Vp({
								code: Bp.MESSAGE_SEND_FAIL,
								message: Qp,
								data: {
									message: n
								}
							}))
						}))
				}
			}, {
				key: "_constructMessageInstance",
				value: function(e) {
					var t = null;
					try {
						var n = this.tim.context.identifier,
							r = {};
						r.currentUser = n, r.from = e.From_Account || n, e.GroupId ? (r
								.conversationID = "".concat(_n.CONV_GROUP).concat(e.GroupId), r
								.conversationType = _n.CONV_GROUP, r.to = e.GroupId) : e
							.To_Account && (r.conversationID = "".concat(_n.CONV_C2C).concat(e
									.To_Account), r.conversationType = _n.CONV_C2C, r.to = e
								.To_Account), r.time = e.MsgTimeStamp || 0, r.random = e
							.Random || e.MsgRandom || 0, r.priority = e.MsgPriority, (t =
								new _h(r)).status = Qu.UNSEND;
						for (var o, i = e.MsgBody.length, a = 0; a < i; a++) "TIMTextElem" === (
								o = e.MsgBody[a]).MsgType ? t.setTextElement(o.MsgContent
							.Text) : "TIMCustomElem" === o.MsgType ? t.setCustomElement({
								data: o.MsgContent.Data || "",
								description: o.MsgContent.Desc || "",
								extension: o.MsgContent.Ext || ""
							}) : "TIMFaceElem" === o.MsgType && t.setFaceElement({
								index: o.MsgContent.Index,
								data: o.MsgContent.Data
							});
						var s = t.getElements();
						t.payload = s[0].content, t.type = s[0].type
					} catch (v_) {
						t = null, Ms.error(
							"ComboMessageController._constructMessageInstance failed. error:",
							v_)
					}
					return t
				}
			}, {
				key: "_addSendMessageSuccessCount",
				value: function(e, t) {
					var n = this.tim.sumStatController,
						r = Math.abs(Date.now() - t);
					n.addSuccessCount(ng), n.addCost(ng, r);
					var o = this._getSendMessageSpecifiedKey(e);
					o && (n.addSuccessCount(o), n.addCost(o, r))
				}
			}, {
				key: "_addSendMessageTotalCount",
				value: function(e) {
					var t = this.tim.sumStatController;
					t.addTotalCount(ng);
					var n = this._getSendMessageSpecifiedKey(e);
					n && t.addTotalCount(n)
				}
			}, {
				key: "_getSendMessageSpecifiedKey",
				value: function(e) {
					if (e.conversationType === _n.CONV_C2C) return rg;
					if (e.conversationType === _n.CONV_GROUP) {
						var t = this.tim.groupController.getLocalGroupProfile(e.to);
						if (!t) return;
						var n = t.type;
						if (zs(n)) return og;
						if (Ws(n)) return ig;
						if (Ys(n)) return ag;
						if (Js(n)) return sg
					}
				}
			}, {
				key: "_generateTjgID",
				value: function(e) {
					return this.tim.context.tinyID + "-" + e.random
				}
			}, {
				key: "reset",
				value: function() {
					Ms.info("ComboMessageController.reset")
				}
			}]), n
		}(Kd),
		f_ = function() {
			function e(t) {
				In(this, e);
				var n = new hg(dg);
				jd.mixin(this), this._initOptions(t), this._initMemberVariables(), this._initControllers(), this
					._initListener(), hg.bindController(this.eventStatController), n.setText("instanceID="
						.concat(this.loginInfo.instanceID, "-oversea=").concat(this.loginInfo.oversea, "-mp=")
						.concat(Fa, "-ua=").concat(Ka)).setEnd(), Ms.info("SDK instanceID:".concat(this
							.loginInfo.instanceID, " oversea:").concat(this.loginInfo.oversea, " inMiniApp:")
						.concat(Fa, ", SDKAppID:").concat(t.SDKAppID, ", UserAgent:").concat(Ka)), this
					._safetyCallbackFactory = new c_
			}
			return En(e, [{
				key: "login",
				value: function(e) {
					return Ms.time(Qd), this._ssoLog = new hg(gg), this.netMonitor.start(), this
						.loginInfo.identifier = e.identifier || e.userID, this.loginInfo
						.userSig = e.userSig, this.signController.login(this.loginInfo)
				}
			}, {
				key: "logout",
				value: function() {
					var e = this.signController.logout();
					return this.resetSDK(), e
				}
			}, {
				key: "on",
				value: function(e, t, n) {
					e === yn.GROUP_SYSTEM_NOTICE_RECEIVED && Ms.warn(
						"！！！TIM.EVENT.GROUP_SYSTEM_NOTICE_RECEIVED v2.6.0起弃用，为了更好的体验，请在 TIM.EVENT.MESSAGE_RECEIVED 事件回调内接收处理群系统通知，详细请参考：https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/Message.html#.GroupSystemNoticePayload"
						), Ms.debug("on", "eventName:".concat(e)), this.outerEmitter.on(e,
						this._safetyCallbackFactory.defense(e, t, n), n)
				}
			}, {
				key: "once",
				value: function(e, t, n) {
					Ms.debug("once", "eventName:".concat(e)), this.outerEmitter.once(e, this
						._safetyCallbackFactory.defenseOnce(e, t, n), n || this)
				}
			}, {
				key: "off",
				value: function(e, t, n, r) {
					Ms.debug("off", "eventName:".concat(e));
					var o = this._safetyCallbackFactory.find(e, t);
					null !== o && (this.outerEmitter.off(e, o, n, r), this
						._safetyCallbackFactory.delete(e, t))
				}
			}, {
				key: "registerPlugin",
				value: function(e) {
					var t = this;
					this.plugins || (this.plugins = {}), Object.keys(e).forEach((function(n) {
						t.plugins[n] = e[n]
					})), new hg(Mg).setText("key=".concat(Object.keys(e))).setEnd()
				}
			}, {
				key: "getPlugin",
				value: function(e) {
					return this.plugins[e] || void 0
				}
			}, {
				key: "setLogLevel",
				value: function(e) {
					if (e <= 0) {
						console.log(["",
							" ________  ______  __       __  __       __  ________  _______",
							"|        \\|      \\|  \\     /  \\|  \\  _  |  \\|        \\|       \\",
							" \\$$$$$$$$ \\$$$$$$| $$\\   /  $$| $$ / \\ | $$| $$$$$$$$| $$$$$$$\\",
							"   | $$     | $$  | $$$\\ /  $$$| $$/  $\\| $$| $$__    | $$__/ $$",
							"   | $$     | $$  | $$$$\\  $$$$| $$  $$$\\ $$| $$  \\   | $$    $$",
							"   | $$     | $$  | $$\\$$ $$ $$| $$ $$\\$$\\$$| $$$$$   | $$$$$$$\\",
							"   | $$    _| $$_ | $$ \\$$$| $$| $$$$  \\$$$$| $$_____ | $$__/ $$",
							"   | $$   |   $$ \\| $$  \\$ | $$| $$$    \\$$$| $$     \\| $$    $$",
							"    \\$$    \\$$$$$$ \\$$      \\$$ \\$$      \\$$ \\$$$$$$$$ \\$$$$$$$",
							"", ""
						].join("\n")), console.log(
							"%cIM 智能客服，随时随地解决您的问题 →_→ https://cloud.tencent.com/act/event/smarty-service?from=im-doc",
							"color:#ff0000");
						console.log(["", "参考以下文档，会更快解决问题哦！(#^.^#)\n",
							"SDK 更新日志: https://cloud.tencent.com/document/product/269/38492\n",
							"SDK 接口文档: https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html\n",
							"常见问题: https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/tutorial-01-faq.html\n",
							"反馈问题？戳我提 issue: https://github.com/tencentyun/TIMSDK/issues\n",
							"如果您需要在生产环境关闭上面的日志，请 tim.setLogLevel(1)\n"
						].join("\n"))
					}
					Ms.setLevel(e)
				}
			}, {
				key: "destroy",
				value: function() {
					var e = this;
					return this.logout().finally((function() {
						e.outerEmitter.emit(yn.SDK_DESTROY, {
							SDKAppID: e.loginInfo.SDKAppID
						})
					}))
				}
			}, {
				key: "createTextMessage",
				value: function(e) {
					return this.messageController.createTextMessage(e)
				}
			}, {
				key: "createTextAtMessage",
				value: function(e) {
					return this.messageController.createTextMessage(e)
				}
			}, {
				key: "createImageMessage",
				value: function(e) {
					return this.messageController.createImageMessage(e)
				}
			}, {
				key: "createAudioMessage",
				value: function(e) {
					return this.messageController.createAudioMessage(e)
				}
			}, {
				key: "createVideoMessage",
				value: function(e) {
					return this.messageController.createVideoMessage(e)
				}
			}, {
				key: "createCustomMessage",
				value: function(e) {
					return this.messageController.createCustomMessage(e)
				}
			}, {
				key: "createFaceMessage",
				value: function(e) {
					return this.messageController.createFaceMessage(e)
				}
			}, {
				key: "createFileMessage",
				value: function(e) {
					return this.messageController.createFileMessage(e)
				}
			}, {
				key: "createMergerMessage",
				value: function(e) {
					return this.messageController.createMergerMessage(e)
				}
			}, {
				key: "downloadMergerMessage",
				value: function(e) {
					return e.type !== _n.MSG_MERGER ? Xd(new Vp({
						code: Bp.MESSAGE_MERGER_TYPE_INVALID,
						message: yf
					})) : ou(e.payload.downloadKey) ? Xd(new Vp({
						code: Bp.MESSAGE_MERGER_KEY_INVALID,
						message: _f
					})) : this.messageController.downloadMergerMessage(e).catch((function(
					e) {
						return Xd(new Vp({
							code: Bp.MESSAGE_MERGER_DOWNLOAD_FAIL,
							message: Mf
						}))
					}))
				}
			}, {
				key: "createForwardMessage",
				value: function(e) {
					return this.messageController.createForwardMessage(e)
				}
			}, {
				key: "sendMessage",
				value: function(e, t) {
					return e instanceof _h ? this.messageController.sendMessageInstance(e, t) :
						Xd(new Vp({
							code: Bp.MESSAGE_SEND_NEED_MESSAGE_INSTANCE,
							message: ef
						}))
				}
			}, {
				key: "callExperimentalAPI",
				value: function(e, t) {
					return "sendComboMessage" === e ? this.comboMessageController.sendMessage(
						t) : Xd(new Vp({
							code: Bp.INVALID_OPERATION,
							message: Zf
						}))
				}
			}, {
				key: "revokeMessage",
				value: function(e) {
					return this.messageController.revokeMessage(e)
				}
			}, {
				key: "resendMessage",
				value: function(e) {
					return this.messageController.resendMessage(e)
				}
			}, {
				key: "getMessageList",
				value: function(e) {
					return this.messageController.getMessageList(e)
				}
			}, {
				key: "setMessageRead",
				value: function(e) {
					return this.messageController.setMessageRead(e)
				}
			}, {
				key: "getConversationList",
				value: function() {
					return this.conversationController.getConversationList()
				}
			}, {
				key: "getConversationProfile",
				value: function(e) {
					return this.conversationController.getConversationProfile(e)
				}
			}, {
				key: "deleteConversation",
				value: function(e) {
					return this.conversationController.deleteConversation(e)
				}
			}, {
				key: "getMyProfile",
				value: function() {
					return this.userController.getMyProfile()
				}
			}, {
				key: "getUserProfile",
				value: function(e) {
					return this.userController.getUserProfile(e)
				}
			}, {
				key: "updateMyProfile",
				value: function(e) {
					return this.userController.updateMyProfile(e)
				}
			}, {
				key: "getFriendList",
				value: function() {
					return this.userController.getFriendList()
				}
			}, {
				key: "deleteFriend",
				value: function(e) {
					return this.userController.deleteFriend(e)
				}
			}, {
				key: "getBlacklist",
				value: function() {
					return this.userController.getBlacklist()
				}
			}, {
				key: "addToBlacklist",
				value: function(e) {
					return this.userController.addBlacklist(e)
				}
			}, {
				key: "removeFromBlacklist",
				value: function(e) {
					return this.userController.deleteBlacklist(e)
				}
			}, {
				key: "getGroupList",
				value: function(e) {
					return this.groupController.getGroupList(e)
				}
			}, {
				key: "getGroupProfile",
				value: function(e) {
					return this.groupController.getGroupProfile(e)
				}
			}, {
				key: "createGroup",
				value: function(e) {
					return this.groupController.createGroup(e)
				}
			}, {
				key: "dismissGroup",
				value: function(e) {
					return this.groupController.dismissGroup(e)
				}
			}, {
				key: "updateGroupProfile",
				value: function(e) {
					return this.groupController.updateGroupProfile(e)
				}
			}, {
				key: "joinGroup",
				value: function(e) {
					return this.groupController.joinGroup(e)
				}
			}, {
				key: "quitGroup",
				value: function(e) {
					return this.groupController.quitGroup(e)
				}
			}, {
				key: "searchGroupByID",
				value: function(e) {
					return this.groupController.searchGroupByID(e)
				}
			}, {
				key: "changeGroupOwner",
				value: function(e) {
					return this.groupController.changeGroupOwner(e)
				}
			}, {
				key: "handleGroupApplication",
				value: function(e) {
					return this.groupController.handleGroupApplication(e)
				}
			}, {
				key: "setMessageRemindType",
				value: function(e) {
					return this.groupController.setMessageRemindType(e)
				}
			}, {
				key: "getGroupMemberList",
				value: function(e) {
					return this.groupController.getGroupMemberList(e)
				}
			}, {
				key: "getGroupMemberProfile",
				value: function(e) {
					return this.groupController.getGroupMemberProfile(e)
				}
			}, {
				key: "getGroupOnlineMemberCount",
				value: function(e) {
					return this.groupController.getGroupOnlineMemberCount(e)
				}
			}, {
				key: "addGroupMember",
				value: function(e) {
					return this.groupController.addGroupMember(e)
				}
			}, {
				key: "deleteGroupMember",
				value: function(e) {
					return this.groupController.deleteGroupMember(e)
				}
			}, {
				key: "setGroupMemberMuteTime",
				value: function(e) {
					return this.groupController.setGroupMemberMuteTime(e)
				}
			}, {
				key: "setGroupMemberRole",
				value: function(e) {
					return this.groupController.setGroupMemberRole(e)
				}
			}, {
				key: "setGroupMemberNameCard",
				value: function(e) {
					return this.groupController.setGroupMemberNameCard(e)
				}
			}, {
				key: "setGroupMemberCustomField",
				value: function(e) {
					return this.groupController.setGroupMemberCustomField(e)
				}
			}, {
				key: "_initOptions",
				value: function(e) {
					this.plugins = {}, this._sdkReloadFlag = !1;
					var t = e.SDKAppID || 0,
						n = xs();
					this.context = {
						SDKAppID: t,
						accountType: n
					}, this.loginInfo = {
						SDKAppID: t,
						accountType: n,
						identifier: null,
						userSig: null,
						unlimitedAVChatRoom: e.unlimitedAVChatRoom || !1,
						scene: e.scene || "",
						oversea: e.oversea || !1,
						avchatroomIDList: [],
						instanceID: eu()
					}, this.options = {
						runLoopNetType: e.runLoopNetType || vp,
						enablePointer: e.enablePointer || !1
					}
				}
			}, {
				key: "_initMemberVariables",
				value: function() {
					this.innerEmitter = new Hy, this.outerEmitter = new Hy, Yd(this
							.outerEmitter), this.packageConfig = new zy(this), this.storage =
						new Ky(this), this.netMonitor = new i_, this.outerEmitter._emit = this
						.outerEmitter.emit, this.outerEmitter.emit = function(e, t) {
							var n = arguments[0],
								r = [n, {
									name: arguments[0],
									data: arguments[1]
								}];
							this.outerEmitter._emit.apply(this.outerEmitter, r)
						}.bind(this), this.innerEmitter._emit = this.innerEmitter.emit, this
						.innerEmitter.emit = function(e, t) {
							var n;
							Ts(arguments[1]) && arguments[1].data ? (Ms.warn(
									"inner eventData has data property, please check!"),
								n = [e, {
									name: arguments[0],
									data: arguments[1].data
								}]) : n = [e, {
								name: arguments[0],
								data: arguments[1]
							}], this.innerEmitter._emit.apply(this.innerEmitter, n)
						}.bind(this)
				}
			}, {
				key: "_initControllers",
				value: function() {
					this.exceptionController = new jv(this), this.connectionController = new Bv(
							this), this.contextController = new $d(this), this.context = this
						.contextController.getContext(), this.signController = new Em(this),
						this.messageController = new Ny(this), this.comboMessageController =
						new p_(this), this.conversationController = new cy(this), this
						.userController = new Qv(this), this.groupController = new Vy(this),
						this.notificationController = new Qy(this), this
						.bigDataHallwayController = new e_(this), this.statusController =
						new By(this), this.uploadController = new Zy(this), this
						.messageLossController = new l_(this), this.eventStatController =
						new n_(this), this.sumStatController = new u_(this), this
						._initReadyListener()
				}
			}, {
				key: "_initListener",
				value: function() {
					var e = this;
					if (this.innerEmitter.on(Nd, this._onSDKReload, this), Fa && "function" ==
						typeof Ba.onAppShow && "function" == typeof Ba.onAppHide) {
						var t = null;
						Ba.onAppHide((function() {
							t = new hg(Mm)
						})), Ba.onAppShow((function() {
							null !== t && t.setNetworkType(e.netMonitor
								.getNetworkType()).setEnd()
						}))
					}
				}
			}, {
				key: "_initReadyListener",
				value: function() {
					for (var e = this, t = this.readyList, n = 0, r = t.length; n < r; n++)
						this[t[n]].ready((function() {
							return e._readyHandle()
						}))
				}
			}, {
				key: "_onSDKReload",
				value: function() {
					var e = this;
					Ms.log("sdk reloading..."), this.resetSDK(), this.login(this.loginInfo)
						.then((function(t) {
							e._sdkReloadFlag = !0
						}))
				}
			}, {
				key: "resetSDK",
				value: function() {
					var e = this;
					this.initList.forEach((function(t) {
							e[t].reset && e[t].reset()
						})), this.netMonitor.reset(), this.storage.reset(), this.resetReady(),
						this._initReadyListener(), this.outerEmitter.emit(yn.SDK_NOT_READY)
				}
			}, {
				key: "_readyHandle",
				value: function() {
					for (var e = this.readyList, t = !0, n = 0, r = e.length; n < r; n++)
						if (!this[e[n]].isReady()) {
							t = !1;
							break
						} if (t) {
						var o = Ms.timeEnd(Qd);
						Ms.warn("SDK is ready. cost=".concat(o, "ms")), this.triggerReady(),
							this.innerEmitter.emit(Rd), this.outerEmitter.emit(yn.SDK_READY),
							this._sdkReloadFlag && (this.outerEmitter.emit(yn.SDK_RELOAD), this
								.groupController.AVChatRoomHandler.joinAVChatRoomSilently(),
								this._sdkReloadFlag = !1), this._ssoLog.setNetworkType(this
								.netMonitor.getNetworkType()).setText(o).setEnd()
					}
				}
			}]), e
		}();
	f_.prototype.readyList = ["conversationController"], f_.prototype.initList = ["exceptionController",
		"connectionController", "signController", "contextController", "messageController",
		"comboMessageController", "conversationController", "userController", "groupController",
		"notificationController", "eventStatController", "sumStatController", "messageLossController",
		"statusController"
	];
	var h_ = {
		login: "login",
		logout: "logout",
		destroy: "destroy",
		on: "on",
		off: "off",
		ready: "ready",
		setLogLevel: "setLogLevel",
		joinGroup: "joinGroup",
		quitGroup: "quitGroup",
		registerPlugin: "registerPlugin",
		getGroupOnlineMemberCount: "getGroupOnlineMemberCount"
	};

	function d_(e, t) {
		return !(!e.isReady() && void 0 === h_[t]) || (e.innerEmitter.emit(Ed, new Vp({
			code: Bp.SDK_IS_NOT_READY,
			message: "".concat(t, " ").concat(eh,
				"，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/module-EVENT.html#.SDK_READY"
				)
		})), !1)
	}
	var g_ = {},
		m_ = {};
	return m_.create = function(e) {
		if (e.SDKAppID && g_[e.SDKAppID]) return g_[e.SDKAppID];
		Ms.log("TIM.create");
		var t = new f_(e);
		t.on(yn.SDK_DESTROY, (function(e) {
			g_[e.data.SDKAppID] = null, delete g_[e.data.SDKAppID]
		}));
		var n = function(e) {
			var t = Object.create(null);
			return Object.keys(kh).forEach((function(n) {
				if (e[n]) {
					var r = kh[n],
						o = new Xn;
					t[r] = function() {
						var t = Array.from(arguments);
						return o.use((function(t, r) {
							return d_(e, n) ? r() : Xd(new Vp({
								code: Bp.SDK_IS_NOT_READY,
								message: "".concat(n, " ")
									.concat(eh, "。")
							}))
						})).use((function(e, t) {
							if (!0 === iu(e, Dh[n], r)) return t()
						})).use((function(t, r) {
							return e[n].apply(e, t)
						})), o.run(t)
					}
				}
			})), t
		}(t);
		return g_[e.SDKAppID] = n, Ms.log("TIM.create ok"), n
	}, m_.TYPES = _n, m_.EVENT = yn, m_.VERSION = "2.10.1", Ms.log("TIM.VERSION: ".concat(m_.VERSION)), m_
}));
